29 lines
345 B
Bash
29 lines
345 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -xe
|
||
|
|
||
|
source /root/provisioning/common.sh
|
||
|
|
||
|
removePkg()
|
||
|
{
|
||
|
apk del --no-cache $1
|
||
|
return $?
|
||
|
}
|
||
|
|
||
|
cleanProv()
|
||
|
{
|
||
|
rm -rf /root/provisioning
|
||
|
return $?
|
||
|
}
|
||
|
|
||
|
for pkg in ${PKG_TO_REMOVE}
|
||
|
do
|
||
|
removePkg ${pkg}
|
||
|
if [ $? -ne 0 ]
|
||
|
then
|
||
|
echo "Warning : removing package ${pkg} failed with code $?"
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
cleanProv
|
||
|
exit $?
|