-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73480c1
commit 5cb897b
Showing
14 changed files
with
168 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
# Remove apt lists | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Locale cleanup | ||
cp -R /usr/share/locale/en\@* /tmp/ && rm -rf /usr/share/locale/* && mv /tmp/en\@* /usr/share/locale/ | ||
|
||
# Clean out docs | ||
rm -rf /usr/share/doc /usr/share/doc-base /usr/share/man /usr/share/locale /usr/share/zoneinfo /var/cache/debconf/*-old | ||
|
||
# Clean out package management dirs | ||
rm -rf /var/lib/cache /var/lib/log | ||
|
||
# Clean out /tmp | ||
rm -rf /tmp/* | ||
|
||
# Clear npm cache | ||
npm cache clear |
15 changes: 10 additions & 5 deletions
15
includes/scripts/_cleanup_deps.sh → includes/scripts/_post_clean.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
#!/bin/sh | ||
|
||
echo "> Purging build dependencies..." | ||
|
||
# Purge build deps | ||
apt-get purge -y $BUILD_DEPS | ||
apt-get remove --purge -y $BUILD_DEPS | ||
check_code $? | ||
|
||
# Autoremove any junk | ||
apt-get clean -y | ||
apt-get autoclean -y | ||
apt-get autoremove -y | ||
check_code $? | ||
|
||
echo "> Cleaning out docs, pkg management cruft and /tmp..." | ||
# Remove apt lists | ||
rm -rf /var/lib/apt/lists/* | ||
check_code $? | ||
|
||
# Locale cleanup | ||
cp -R /usr/share/locale/en\@* /tmp/ && rm -rf /usr/share/locale/* && mv /tmp/en\@* /usr/share/locale/ | ||
|
||
# Clean out docs | ||
rm -rf /usr/share/doc /usr/share/doc-base /usr/share/man /usr/share/locale /usr/share/zoneinfo | ||
rm -rf /usr/share/doc /usr/share/doc-base /usr/share/man /usr/share/locale /usr/share/zoneinfo /var/cache/debconf/*-old | ||
|
||
# Clean out package management dirs | ||
rm -rf /var/lib/cache /var/lib/log | ||
|
||
# Clean out /tmp | ||
rm -rf /tmp/* | ||
|
||
echo "> Clearing npm cache" | ||
# Clear npm cache | ||
npm cache clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
echo "[-] Performing image cleanup..." | ||
|
||
# Purge packages | ||
apt-get purge -y `apt-mark showauto` | ||
apt-get remove --purge -y `apt-mark showauto` | ||
check_code $? | ||
|
||
# Autoremove any junk | ||
apt-get clean -y | ||
apt-get autoclean -y | ||
apt-get autoremove -y | ||
check_code $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ BASEDIR=`dirname $0` | |
node $TUPPERBUILD_DIR/main.js $1 | ||
check_code $? | ||
|
||
rm -rf /tmp/* | ||
. $BASEDIR/_cleanup_deps.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.