diff options
author | Anthony Fok <foka@debian.org> | 2018-08-18 06:26:54 -0600 |
---|---|---|
committer | Anthony Fok <foka@debian.org> | 2018-08-18 06:26:54 -0600 |
commit | 834617f9f8d870643b2631fe607471c8e2ef2f47 (patch) | |
tree | f0d96dcf6a080da7801784ffbe426e5981527021 /snapcraft.yaml | |
parent | ef20ec1fbaa8f5841b3fbe18978d4d8c19d8fc53 (diff) |
snap: Remove unused files from Git, Perl, etc.
Snap size reduced from 46MB to 26MB.
Diffstat (limited to 'snapcraft.yaml')
-rw-r--r-- | snapcraft.yaml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/snapcraft.yaml b/snapcraft.yaml index 2e7fbd568..6e851767b 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -50,6 +50,25 @@ parts: ls -l $SNAPCRAFT_PART_INSTALL/bin/hugo strip --remove-section=.comment --remove-section=.note $SNAPCRAFT_PART_INSTALL/bin/hugo ls -l $SNAPCRAFT_PART_INSTALL/bin/hugo + echo " * Remove unneeded files..." + rm -rf $SNAPCRAFT_PART_INSTALL/etc + rm -f $SNAPCRAFT_PART_INSTALL/usr/bin/[^gp]* + rm -f $SNAPCRAFT_PART_INSTALL/usr/bin/git-* + rm -f $SNAPCRAFT_PART_INSTALL/usr/bin/p[^y]* + rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/git-[^lr]* + rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/git-ls-* + rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/git-re[^v]* + rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/git-revert + rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/git-rm + rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/mergetools + rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/*/perl + rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/mime + rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/python*/lib2to3 + rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/valgrind + rm -rf $SNAPCRAFT_PART_INSTALL/usr/sbin + rm -rf $SNAPCRAFT_PART_INSTALL/usr/share/[^p]* + rm -rf $SNAPCRAFT_PART_INSTALL/usr/share/p[^y]* + rm -rf $SNAPCRAFT_PART_INSTALL/var after: [go] go: source-tag: go1.10.3 |