diff --git a/linux/ubuntu/scripts/act.sh b/linux/ubuntu/scripts/act.sh index 08d33f4..cf624a7 100755 --- a/linux/ubuntu/scripts/act.sh +++ b/linux/ubuntu/scripts/act.sh @@ -166,6 +166,10 @@ for SCRIPT in "${scripts[@]}"; do "/imagegeneration/installers/${SCRIPT}.sh" done +printf "\n\tšŸ‹ Creating ~/.local/bin and adding to PATH šŸ‹\t\n" +mkdir -m 0755 -p "${HOME}/.local/bin" +sed "s|^PATH=|PATH=${HOME}/.local/bin:|mg" -i /etc/environment + printf "\n\tšŸ‹ Cleaning image šŸ‹\t\n" apt-get clean rm -rf /var/cache/* /var/log/* /var/lib/apt/lists/* /tmp/* || echo 'Failed to delete directories' diff --git a/linux/ubuntu/scripts/runner.sh b/linux/ubuntu/scripts/runner.sh index 7aefb5f..e83ff7d 100755 --- a/linux/ubuntu/scripts/runner.sh +++ b/linux/ubuntu/scripts/runner.sh @@ -41,6 +41,11 @@ mkdir -m 0700 -p "/home/${RUNNER}/.ssh" chmod 644 "/home/${RUNNER}/.ssh/known_hosts" chown -R "${RUNNER}":"${RUNNER}" "/home/${RUNNER}/.ssh" +mkdir -m 0755 -p "/home/${RUNNER}/.local/bin" +chown -R "${RUNNER}":"${RUNNER}" "/home/${RUNNER}/.local" +sed '/^PATH=/s,\([=:]\)/root/.local/bin\(:\|$\),\1,g' -i /etc/environment +sed "s,^PATH=,PATH=/home/${RUNNER}/.local/bin:," -i /etc/environment + . /etc/environment # Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?shellcheck(SC2140)