Files
runner-images-sangeeth/images/ubuntu/scripts/build/configure-system.sh
Shamil Mubarakshin 1658c2e905 [ubuntu] Cleanup bash scripts (#9076)
* [ubuntu] Cleanup bash scripts

* Fix ms-repos lsb_release

* Fix install-bicep url

* Fix install-nvm
2023-12-29 12:36:27 +01:00

34 lines
928 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash -e
################################################################################
## File: configure-system.sh
## Desc: Post deployment system configuration actions
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPT_FOLDER/etc-environment.sh
mv -f /imagegeneration/post-generation /opt
echo "chmod -R 777 /opt"
chmod -R 777 /opt
echo "chmod -R 777 /usr/share"
chmod -R 777 /usr/share
chmod 755 $IMAGE_FOLDER
# Remove quotes around PATH
ENVPATH=$(grep 'PATH=' /etc/environment | head -n 1 | sed -z 's/^PATH=*//')
ENVPATH=${ENVPATH#"\""}
ENVPATH=${ENVPATH%"\""}
add_etc_environment_variable "PATH" "${ENVPATH}"
echo "Updated /etc/environment: $(cat /etc/environment)"
# Сlean yarn and npm cache
if yarn --version > /dev/null; then
yarn cache clean
fi
if npm --version; then
npm cache clean --force
fi