Put dynamic expressions in quotes
This commit is contained in:
parent
c59b48b50b
commit
d6234bd7c9
15 changed files with 102 additions and 102 deletions
|
@ -7,7 +7,7 @@ else
|
||||||
apt install -y p7zip-full libgumbo-dev libfuse-dev libssl-dev libcurl4-openssl-dev uuid-dev;
|
apt install -y p7zip-full libgumbo-dev libfuse-dev libssl-dev libcurl4-openssl-dev uuid-dev;
|
||||||
workingDirectory="$(pwd)";
|
workingDirectory="$(pwd)";
|
||||||
tempDir="$(mktemp -d)";
|
tempDir="$(mktemp -d)";
|
||||||
cd $tempDir;
|
cd "$tempDir";
|
||||||
|
|
||||||
git clone https://github.com/fangfufu/httpdirfs.git;
|
git clone https://github.com/fangfufu/httpdirfs.git;
|
||||||
pushd httpdirfs;
|
pushd httpdirfs;
|
||||||
|
@ -23,10 +23,10 @@ else
|
||||||
|
|
||||||
rm -f /usr/local/bin/httpdirfs;
|
rm -f /usr/local/bin/httpdirfs;
|
||||||
|
|
||||||
cd $tempDir;
|
cd "$tempDir";
|
||||||
wget -O CascadiaCode.zip https://github.com/microsoft/cascadia-code/releases/download/v2111.01/CascadiaCode-2111.01.zip;
|
wget -O CascadiaCode.zip https://github.com/microsoft/cascadia-code/releases/download/v2111.01/CascadiaCode-2111.01.zip;
|
||||||
unzip -d . CascadiaCode.zip;
|
unzip -d . CascadiaCode.zip;
|
||||||
cp ttf/* /usr/share/fonts/TTF;
|
cp ttf/* /usr/share/fonts/TTF;
|
||||||
|
|
||||||
cd $workingDirectory;
|
cd "$workingDirectory";
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,11 +4,11 @@ if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo bash "$BASH_SOURCE" "$USER";
|
sudo bash "$BASH_SOURCE" "$USER";
|
||||||
else
|
else
|
||||||
homeDir=$(sudo -u $1 bash -c 'realpath ~');
|
homeDir="$(sudo -u "$1" bash -c 'realpath ~')";
|
||||||
fontFileBaseName="Caskaydia Cove Regular Nerd Font Complete.otf";
|
fontFileBaseName="Caskaydia Cove Regular Nerd Font Complete.otf";
|
||||||
tempFile=$(sudo -u $1 mktemp -d)/$fontFileBaseName;
|
tempFile="$(sudo -u "$1" mktemp -d)/$fontFileBaseName";
|
||||||
destination=/usr/share/font/opentype;
|
destination=/usr/share/font/opentype;
|
||||||
|
|
||||||
sudo -u $1 cp "$homeDir/Nextcloud/Caskaydia Cove Regular Nerd Font Complete.otf" "$tempFile";
|
sudo -u "$1" cp "$homeDir/Nextcloud/Caskaydia Cove Regular Nerd Font Complete.otf" "$tempFile";
|
||||||
cp "$tempFile" /usr/share/fonts/opentype;
|
cp "$tempFile" /usr/share/fonts/opentype;
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
commandName=gnome-shell-extension-installer;
|
commandName=gnome-shell-extension-installer;
|
||||||
extensionLocation=/usr/share/gnome-shell/extensions;
|
extensionLocation=/usr/share/gnome-shell/extensions;
|
||||||
workingDirectory=$(pwd);
|
workingDirectory="$(pwd)";
|
||||||
contextRoot=$(mktemp -d);
|
contextRoot="$(mktemp -d)";
|
||||||
cd "$contextRoot";
|
cd "$contextRoot";
|
||||||
sudo apt install -y jq;
|
sudo apt install -y jq;
|
||||||
|
|
||||||
|
@ -14,15 +14,15 @@ rm -rf "$contextRoot";
|
||||||
|
|
||||||
for id in 779 4907 1162
|
for id in 779 4907 1162
|
||||||
do
|
do
|
||||||
workingDirectory=$(pwd);
|
workingDirectory="$(pwd)";
|
||||||
contextRoot=$(mktemp -d);
|
contextRoot="$(mktemp -d)";
|
||||||
unzipLocation=$(mktemp -d);
|
unzipLocation="$(mktemp -d)";
|
||||||
cd "$contextRoot";
|
cd "$contextRoot";
|
||||||
|
|
||||||
gnome-shell-extension-installer $id --no-install;
|
gnome-shell-extension-installer "$id" --no-install;
|
||||||
sudo gnome-shell-extension-installer $id --yes;
|
sudo gnome-shell-extension-installer "$id" --yes;
|
||||||
unzip ./*.zip -d "$unzipLocation";
|
unzip ./*.zip -d "$unzipLocation";
|
||||||
uuid=$(jq -r '.uuid' "$unzipLocation/metadata.json");
|
uuid="$(jq -r '.uuid' "$unzipLocation/metadata.json")";
|
||||||
|
|
||||||
sudo chmod -R +r "$extensionLocation/$uuid";
|
sudo chmod -R +r "$extensionLocation/$uuid";
|
||||||
gnome-extensions enable "$uuid";
|
gnome-extensions enable "$uuid";
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
provider=$1;
|
provider="$1";
|
||||||
dirname=$2;
|
dirname="$2";
|
||||||
serviceName=rclone@$provider:$dirname;
|
serviceName="rclone@$provider:$dirname";
|
||||||
|
|
||||||
echo "Please create a remote called \`$1\`";
|
echo "Please create a remote called \`$1\`";
|
||||||
rclone config;
|
rclone config;
|
||||||
|
|
||||||
mkdir -p ~/$dirname;
|
mkdir -p "~/$dirname";
|
||||||
|
|
||||||
systemctl --user enable $serviceName;
|
systemctl --user enable "$serviceName";
|
||||||
systemctl --user daemon-reload;
|
systemctl --user daemon-reload;
|
||||||
systemctl --user start $serviceName;
|
systemctl --user start "$serviceName";
|
||||||
|
|
|
@ -15,8 +15,8 @@ else
|
||||||
systemctl enable iptsd;
|
systemctl enable iptsd;
|
||||||
|
|
||||||
# Install DTX
|
# Install DTX
|
||||||
package=$(mktemp);
|
package="$(mktemp)";
|
||||||
wget https://github.com/linux-surface/surface-dtx-daemon/releases/download/v0.3.3-2/surface-dtx-daemon_0.3.3-2_amd64.deb -O $package;
|
wget https://github.com/linux-surface/surface-dtx-daemon/releases/download/v0.3.3-2/surface-dtx-daemon_0.3.3-2_amd64.deb -O "$package";
|
||||||
dpkg -i $package;
|
dpkg -i "$package";
|
||||||
rm -f $package;
|
rm -f "$package";
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
scriptRoot=$(realpath "${BASH_SOURCE%/*}");
|
scriptRoot="$(realpath "${BASH_SOURCE%/*}")";
|
||||||
|
|
||||||
# Elevate script
|
# Elevate script
|
||||||
if [ ! "$UID" -eq 0 ]
|
if [ ! "$UID" -eq 0 ]
|
||||||
|
@ -25,18 +25,18 @@ else
|
||||||
# Initialize variables
|
# Initialize variables
|
||||||
src="./boot/efi/EFI/fedora";
|
src="./boot/efi/EFI/fedora";
|
||||||
esp=/boot/efi;
|
esp=/boot/efi;
|
||||||
defaultBootDir=$esp/EFI/BOOT;
|
defaultBootDir="$esp/EFI/BOOT";
|
||||||
microsoftBootDir=$esp/EFI/Microsoft/Boot;
|
microsoftBootDir="$esp/EFI/Microsoft/Boot";
|
||||||
|
|
||||||
systemdDirName=/EFI/systemd;
|
systemdDirName=/EFI/systemd;
|
||||||
systemdFullName=$esp$systemdDirName;
|
systemdFullName="$esp$systemdDirName";
|
||||||
systemdFile=$systemdFullName/systemd-bootx64.efi;
|
systemdFile="$systemdFullName/systemd-bootx64.efi";
|
||||||
bootFile=$defaultBootDir/grubx64.efi;
|
bootFile="$defaultBootDir/grubx64.efi";
|
||||||
|
|
||||||
# Set up files
|
# Set up files
|
||||||
cp $systemdFile $bootFile;
|
cp "$systemdFile" "$bootFile";
|
||||||
cp "$src/shimx64.efi" $defaultBootDir/BOOTx64.efi;
|
cp "$src/shimx64.efi" "$defaultBootDir/BOOTx64.efi";
|
||||||
cp "$src/mmx64.efi" $defaultBootDir;
|
cp "$src/mmx64.efi" "$defaultBootDir";
|
||||||
cp /usr/lib/efitools/x86_64-linux-gnu/KeyTool.efi /boot/efi/EFI/systemd/;
|
cp /usr/lib/efitools/x86_64-linux-gnu/KeyTool.efi /boot/efi/EFI/systemd/;
|
||||||
wget https://github.com/tianocore/edk2-archive/raw/master/ShellBinPkg/UefiShell/X64/Shell.efi -O "$systemdFullName/Shell.efi";
|
wget https://github.com/tianocore/edk2-archive/raw/master/ShellBinPkg/UefiShell/X64/Shell.efi -O "$systemdFullName/Shell.efi";
|
||||||
|
|
||||||
|
@ -89,6 +89,6 @@ else
|
||||||
mokutil --import "$keyDir/MOK.der";
|
mokutil --import "$keyDir/MOK.der";
|
||||||
|
|
||||||
# Remove context directory
|
# Remove context directory
|
||||||
cd $workingDirectory;
|
cd "$workingDirectory";
|
||||||
rm -rf $contextRoot;
|
rm -rf "$contextRoot";
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -10,6 +10,6 @@ else
|
||||||
|
|
||||||
for file in $(find /lib/modules /var/lib/dkms -name *.ko);
|
for file in $(find /lib/modules /var/lib/dkms -name *.ko);
|
||||||
do
|
do
|
||||||
kmodsign sha512 $keyFile $pubFile $file;
|
kmodsign sha512 "$keyFile" "$pubFile" "$file";
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -5,46 +5,46 @@ then
|
||||||
sudo bash "$BASH_SOURCE" "$USER";
|
sudo bash "$BASH_SOURCE" "$USER";
|
||||||
else
|
else
|
||||||
# Download and extract `youtube-music-dl`
|
# Download and extract `youtube-music-dl`
|
||||||
archiveName=$(sudo -u $1 mktemp);
|
archiveName="$(sudo -u "$1" mktemp)";
|
||||||
sudo -u $1 wget https://github.com/dougppaz/youtube-music-dl/releases/download/v1.2.1/youtube-music-dl.zip -O $archiveName;
|
sudo -u "$1" wget https://github.com/dougppaz/youtube-music-dl/releases/download/v1.2.1/youtube-music-dl.zip -O "$archiveName";
|
||||||
extensionName=youtube-music-dl;
|
extensionName=youtube-music-dl;
|
||||||
|
|
||||||
contextRoot=$(sudo -u $1 mktemp -d);
|
contextRoot="$(sudo -u "$1" mktemp -d)";
|
||||||
extensionDir=$contextRoot/$extensionName;
|
extensionDir="$contextRoot/$extensionName";
|
||||||
keyFile=$extensionDir.pem;
|
keyFile="$extensionDir.pem";
|
||||||
extensionFile=$extensionDir.crx;
|
extensionFile="$extensionDir.crx";
|
||||||
manifestFile=$extensionDir/manifest.json;
|
manifestFile="$extensionDir/manifest.json";
|
||||||
|
|
||||||
extensionRoot=/usr/share/brave-extensions;
|
extensionRoot=/usr/share/brave-extensions;
|
||||||
destination=$extensionRoot/$extensionName.crx;
|
destination="$extensionRoot/$extensionName.crx";
|
||||||
|
|
||||||
# Prepare extension
|
# Prepare extension
|
||||||
mkdir -p $extensionRoot;
|
mkdir -p "$extensionRoot";
|
||||||
sudo -u $1 unzip $archiveName -d $extensionDir;
|
sudo -u "$1" unzip "$archiveName" -d "$extensionDir";
|
||||||
sudo -u $1 brave-browser --pack-extension=$extensionDir;
|
sudo -u "$1" brave-browser --pack-extension="$extensionDir";
|
||||||
rm $archiveName;
|
rm "$archiveName";
|
||||||
|
|
||||||
# Tamper manifest file
|
# Tamper manifest file
|
||||||
manifest="$(cat $manifestFile | jq ". + {key: "'"'"$(openssl rsa -in $keyFile -pubout -outform DER | openssl base64 -A)"'"'"}")";
|
manifest="$(cat "$manifestFile" | jq ". + {key: "'"'"$(openssl rsa -in "$keyFile" -pubout -outform DER | openssl base64 -A)"'"'"}")";
|
||||||
manifest="$(echo $manifest | jq ".background.persistent = false")";
|
manifest="$(echo "$manifest" | jq ".background.persistent = false")";
|
||||||
echo $manifest | sudo -u $1 tee $manifestFile;
|
echo "$manifest" | sudo -u "$1" tee "$manifestFile";
|
||||||
|
|
||||||
# Pack extension
|
# Pack extension
|
||||||
extensionID=$(openssl rsa -in $keyFile -pubout -outform DER | sha256sum | head -c32 | tr 0-9a-f a-p);
|
extensionID="$(openssl rsa -in "$keyFile" -pubout -outform DER | sha256sum | head -c32 | tr 0-9a-f a-p)";
|
||||||
extensionVersion=$(cat $manifestFile | jq -r '.version');
|
extensionVersion="$(cat "$manifestFile" | jq -r '.version')";
|
||||||
sudo -u $1 brave-browser --pack-extension=$extensionDir --pack-extension-key=$keyFile;
|
sudo -u "$1" brave-browser --pack-extension="$extensionDir" --pack-extension-key="$keyFile";
|
||||||
|
|
||||||
# Install extension and preinstall it
|
# Install extension and preinstall it
|
||||||
cp $extensionFile $extensionRoot;
|
cp "$extensionFile" "$extensionRoot";
|
||||||
configRoot=/opt/brave.com/brave/extensions/;
|
configRoot=/opt/brave.com/brave/extensions/
|
||||||
rm -rf $contextRoot;
|
rm -rf "$contextRoot";
|
||||||
chmod -R a+rx $extensionRoot;
|
chmod -R a+rx "$extensionRoot";
|
||||||
chmod -R u+w $extensionRoot;
|
chmod -R u+w "$extensionRoot";
|
||||||
mkdir -p $configRoot;
|
mkdir -p "$configRoot";
|
||||||
{
|
{
|
||||||
echo "{";
|
echo "{";
|
||||||
echo ' "external_crx": "'"$destination"'",';
|
echo ' "external_crx": "'"$destination"'",';
|
||||||
echo ' "external_version": "'"$extensionVersion"'"';
|
echo ' "external_version": "'"$extensionVersion"'"';
|
||||||
echo "}";
|
echo "}";
|
||||||
} | tee $configRoot/$extensionID.json;
|
} | tee "$configRoot/$extensionID.json";
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,15 +4,15 @@ if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo bash "$BASH_SOURCE";
|
sudo bash "$BASH_SOURCE";
|
||||||
else
|
else
|
||||||
workingDirectory=$(pwd);
|
workingDirectory="$(pwd)";
|
||||||
contextRoot=$(mktemp -d);
|
contextRoot="$(mktemp -d)";
|
||||||
cd $contextRoot;
|
cd "$contextRoot";
|
||||||
|
|
||||||
curl -fsSL https://raw.githubusercontent.com/nagygergo/jetbrains-toolbox-install/1.1/jetbrains-toolbox.sh \
|
curl -fsSL https://raw.githubusercontent.com/nagygergo/jetbrains-toolbox-install/1.1/jetbrains-toolbox.sh \
|
||||||
| bash;
|
| bash;
|
||||||
|
|
||||||
cd $workingDirectory;
|
cd "$workingDirectory";
|
||||||
rm -rf $contextRoot;
|
rm -rf "$contextRoot";
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "[Desktop Entry]";
|
echo "[Desktop Entry]";
|
||||||
|
|
|
@ -5,21 +5,21 @@ then
|
||||||
sudo bash "$BASH_SOURCE" "$USER";
|
sudo bash "$BASH_SOURCE" "$USER";
|
||||||
else
|
else
|
||||||
bin=oh-my-posh;
|
bin=oh-my-posh;
|
||||||
workingDirectory=$(pwd);
|
workingDirectory="$(pwd)";
|
||||||
contextRoot=$(mktemp -d);
|
contextRoot="$(mktemp -d)";
|
||||||
cd $contextRoot;
|
cd "$contextRoot";
|
||||||
|
|
||||||
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O $bin;
|
wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O "$bin";
|
||||||
install $bin /usr/local/bin;
|
install "$bin" /usr/local/bin;
|
||||||
|
|
||||||
cd $workingDirectory;
|
cd "$workingDirectory";
|
||||||
rm -rf $contextRoot;
|
rm -rf "$contextRoot";
|
||||||
|
|
||||||
homeDir=$(sudo -u $1 bash -c 'realpath ~');
|
homeDir="$(sudo -u "$1" bash -c 'realpath ~')";
|
||||||
|
|
||||||
sudo -u $1 mkdir -p $homeDir/.omp;
|
sudo -u "$1" mkdir -p "$homeDir/.omp";
|
||||||
sudo -u $1 cp $homeDir/Nextcloud/.omp/manuel.omp.json $homeDir/.omp/manuel.omp.json;
|
sudo -u "$1" cp "$homeDir/Nextcloud/.omp/manuel.omp.json" "$homeDir/.omp/manuel.omp.json";
|
||||||
|
|
||||||
echo 'eval "$(oh-my-posh init bash --config ~/.omp/manuel.omp.json)"' \
|
echo 'eval "$(oh-my-posh init bash --config ~/.omp/manuel.omp.json)"' \
|
||||||
| sudo -u $1 tee -a $homeDir/.bashrc;
|
| sudo -u "$1" tee -a "$homeDir/.bashrc";
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -5,17 +5,17 @@ then
|
||||||
sudo bash "$BASH_SOURCE";
|
sudo bash "$BASH_SOURCE";
|
||||||
else
|
else
|
||||||
apt install -y wget gpg;
|
apt install -y wget gpg;
|
||||||
keyFile=$(mktemp);
|
keyFile="$(mktemp)";
|
||||||
|
|
||||||
wget -qO- https://packages.microsoft.com/keys/microsoft.asc \
|
wget -qO- https://packages.microsoft.com/keys/microsoft.asc \
|
||||||
| gpg --dearmor > $keyFile;
|
| gpg --dearmor > "$keyFile";
|
||||||
|
|
||||||
install -D -o root -g root -m 644 $keyFile /etc/apt/keyrings/packages.microsoft.gpg;
|
install -D -o root -g root -m 644 "$keyFile" /etc/apt/keyrings/packages.microsoft.gpg;
|
||||||
|
|
||||||
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" \
|
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" \
|
||||||
| tee /etc/apt/sources.list.d/vscode.list;
|
| tee /etc/apt/sources.list.d/vscode.list;
|
||||||
|
|
||||||
rm -f $keyFile;
|
rm -f "$keyFile";
|
||||||
|
|
||||||
apt update;
|
apt update;
|
||||||
apt install -y code;
|
apt install -y code;
|
||||||
|
|
|
@ -4,9 +4,9 @@ if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo bash "$BASH_SOURCE";
|
sudo bash "$BASH_SOURCE";
|
||||||
else
|
else
|
||||||
workingDirectory=$(pwd);
|
workingDirectory="$(pwd)";
|
||||||
contextRoot=$(mktemp -d);
|
contextRoot="$(mktemp -d)";
|
||||||
cd $contextRoot;
|
cd "$contextRoot";
|
||||||
|
|
||||||
# Preview from docker container
|
# Preview from docker container
|
||||||
# container_id="$(docker create woodpeckerci/woodpecker-cli:next)"
|
# container_id="$(docker create woodpeckerci/woodpecker-cli:next)"
|
||||||
|
@ -19,6 +19,6 @@ else
|
||||||
tar -xvzf woodpecker-cli.tar.gz;
|
tar -xvzf woodpecker-cli.tar.gz;
|
||||||
install woodpecker-cli /usr/local/bin;
|
install woodpecker-cli /usr/local/bin;
|
||||||
|
|
||||||
cd $workingDirectory;
|
cd "$workingDirectory";
|
||||||
rm -rf $contextRoot;
|
rm -rf "$contextRoot";
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,16 +4,16 @@ if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo bash "$BASH_SOURCE" "$USER";
|
sudo bash "$BASH_SOURCE" "$USER";
|
||||||
else
|
else
|
||||||
package=$(mktemp);
|
package="$(mktemp)";
|
||||||
wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb -O $package;
|
wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb -O "$package";
|
||||||
dpkg -i $package;
|
dpkg -i "$package";
|
||||||
rm -f $package;
|
rm -f "$package";
|
||||||
|
|
||||||
homeDir=$(sudo -u $1 bash -c 'realpath ~');
|
homeDir="$(sudo -u "$1" bash -c 'realpath ~')";
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "alias ls='logo-ls -D'";
|
echo "alias ls='logo-ls -D'";
|
||||||
echo "alias ll='ls -al'";
|
echo "alias ll='ls -al'";
|
||||||
echo "alias l='ls'";
|
echo "alias l='ls'";
|
||||||
} | sudo -u $1 tee -a $homeDir/.bashrc;
|
} | sudo -u "$1" tee -a "$homeDir/.bashrc";
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,10 +4,10 @@ if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo bash "$BASH_SOURCE";
|
sudo bash "$BASH_SOURCE";
|
||||||
else
|
else
|
||||||
package=$(mktemp);
|
package="$(mktemp)";
|
||||||
wget https://github.com/rclone/rclone/releases/download/v1.60.0/rclone-v1.60.0-linux-amd64.deb -O $package;
|
wget https://github.com/rclone/rclone/releases/download/v1.60.0/rclone-v1.60.0-linux-amd64.deb -O "$package";
|
||||||
dpkg -i $package;
|
dpkg -i "$package";
|
||||||
rm -f $package;
|
rm -f "$package";
|
||||||
|
|
||||||
cp ${BASH_SOURCE%/*}/rclone@.service /etc/systemd/user;
|
cp "${BASH_SOURCE%/*}/rclone@.service" /etc/systemd/user;
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,13 +4,13 @@ if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo bash "$BASH_SOURCE";
|
sudo bash "$BASH_SOURCE";
|
||||||
else
|
else
|
||||||
workingDirectory=$(pwd);
|
workingDirectory="$(pwd)";
|
||||||
contextRoot=$(mktemp -d);
|
contextRoot="$(mktemp -d)";
|
||||||
cd $contextRoot;
|
cd "$contextRoot";
|
||||||
|
|
||||||
wget https://dl.gitea.io/tea/0.9.0/tea-0.9.0-linux-amd64 -O tea;
|
wget https://dl.gitea.io/tea/0.9.0/tea-0.9.0-linux-amd64 -O tea;
|
||||||
install tea /usr/local/bin;
|
install tea /usr/local/bin;
|
||||||
|
|
||||||
cd $workingDirectory;
|
cd "$workingDirectory";
|
||||||
rm -rf $contextRoot;
|
rm -rf "$contextRoot";
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue