Manage workind directories using pushd
/popd
This commit is contained in:
parent
d6234bd7c9
commit
38b9812d97
8 changed files with 17 additions and 26 deletions
scripts/Software
|
@ -4,14 +4,13 @@ if [ ! "$UID" -eq 0 ]
|
|||
then
|
||||
sudo bash "$BASH_SOURCE";
|
||||
else
|
||||
workingDirectory="$(pwd)";
|
||||
contextRoot="$(mktemp -d)";
|
||||
cd "$contextRoot";
|
||||
pushd "$contextRoot";
|
||||
|
||||
curl -fsSL https://raw.githubusercontent.com/nagygergo/jetbrains-toolbox-install/1.1/jetbrains-toolbox.sh \
|
||||
| bash;
|
||||
|
||||
cd "$workingDirectory";
|
||||
popd;
|
||||
rm -rf "$contextRoot";
|
||||
|
||||
{
|
||||
|
|
|
@ -5,14 +5,13 @@ then
|
|||
sudo bash "$BASH_SOURCE" "$USER";
|
||||
else
|
||||
bin=oh-my-posh;
|
||||
workingDirectory="$(pwd)";
|
||||
contextRoot="$(mktemp -d)";
|
||||
cd "$contextRoot";
|
||||
pushd "$contextRoot";
|
||||
|
||||
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O "$bin";
|
||||
install "$bin" /usr/local/bin;
|
||||
|
||||
cd "$workingDirectory";
|
||||
popd;
|
||||
rm -rf "$contextRoot";
|
||||
|
||||
homeDir="$(sudo -u "$1" bash -c 'realpath ~')";
|
||||
|
|
|
@ -4,7 +4,6 @@ if [ ! "$UID" -eq 0 ]
|
|||
then
|
||||
sudo bash "$BASH_SOURCE";
|
||||
else
|
||||
workingDirectory="$(pwd)";
|
||||
contextRoot="$(mktemp -d)";
|
||||
cd "$contextRoot";
|
||||
|
||||
|
@ -19,6 +18,6 @@ else
|
|||
tar -xvzf woodpecker-cli.tar.gz;
|
||||
install woodpecker-cli /usr/local/bin;
|
||||
|
||||
cd "$workingDirectory";
|
||||
popd;
|
||||
rm -rf "$contextRoot";
|
||||
fi
|
||||
|
|
|
@ -4,13 +4,12 @@ if [ ! "$UID" -eq 0 ]
|
|||
then
|
||||
sudo bash "$BASH_SOURCE";
|
||||
else
|
||||
workingDirectory="$(pwd)";
|
||||
contextRoot="$(mktemp -d)";
|
||||
cd "$contextRoot";
|
||||
pushd "$contextRoot";
|
||||
|
||||
wget https://dl.gitea.io/tea/0.9.0/tea-0.9.0-linux-amd64 -O tea;
|
||||
install tea /usr/local/bin;
|
||||
|
||||
cd "$workingDirectory";
|
||||
popd;
|
||||
rm -rf "$contextRoot";
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue