Files
runner-images/images/linux/scripts/installers/post-deployment.sh
T

32 lines
807 B
Bash
Raw Normal View History

2020-10-07 13:49:40 +05:00
#!/bin/bash -e
2020-09-21 11:18:28 +03:00
################################################################################
## File: post-deployment.sh
## Desc: Post deployment actions
################################################################################
mv -f /imagegeneration/post-generation /opt
2021-11-15 18:35:50 +01:00
echo "chmod -R 777 /opt"
chmod -R 777 /opt
echo "chmod -R 777 /usr/share"
chmod -R 777 /usr/share
chmod 755 $IMAGE_FOLDER
2020-11-03 15:56:49 +03:00
# Remove quotes around PATH
2020-11-05 22:08:19 +03:00
ENVPATH=$(grep 'PATH=' /etc/environment | head -n 1 | sed -z 's/^PATH=*//')
2020-11-05 10:36:01 +03:00
ENVPATH=${ENVPATH#"\""}
ENVPATH=${ENVPATH%"\""}
echo "PATH=$ENVPATH" | sudo tee -a /etc/environment
echo "Updated /etc/environment: $(cat /etc/environment)"
2020-10-27 17:24:59 +03:00
# Clean yarn and npm cache
if yarn --version > /dev/null
then
yarn cache clean
fi
if npm --version
then
npm cache clean --force
fi