Fix elevation script
This commit is contained in:
parent
491b354971
commit
7d40b6d3f5
15 changed files with 235 additions and 235 deletions
|
@ -2,8 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0" "$USER"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE" "$USER"
|
||||
else
|
||||
homeDir=$(sudo -u $1 bash -c 'realpath ~')
|
||||
cp "$homeDir/Nextcloud/Caskaydia Cove Regular Nerd Font Complete.otf" /usr/share/font/opentype
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc \
|
||||
| gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/linux-surface.gpg
|
||||
|
||||
|
@ -20,3 +19,4 @@ 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
|
||||
dpkg -i $package
|
||||
rm -f $package
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
# Create context directory
|
||||
workingDirectory=$(pwd)
|
||||
contextRoot=$(mktemp -d)
|
||||
|
@ -44,3 +43,4 @@ cp $systemdFile $microsoftBootDir/$loaderBaseName
|
|||
# Remove context directory
|
||||
cd $workingDirectory
|
||||
rm -rf $contextRoot
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
# Prepare
|
||||
apt install -y wget unzip jq apt-transport-https curl
|
||||
curl -fsSLo /usr/share/keyrings/brave-browser-beta-archive-keyring.gpg https://brave-browser-apt-beta.s3.brave.com/brave-browser-beta-archive-keyring.gpg
|
||||
|
@ -16,3 +15,4 @@ apt install -y brave-browser-beta
|
|||
|
||||
# Add pre-installed extensions
|
||||
sudo ln -s /opt/brave.com/brave/extensions /opt/brave.com/brave-beta/extensions
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0" "$USER"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE" "$USER"
|
||||
else
|
||||
# Download and extract `youtube-music-dl`
|
||||
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
|
||||
|
@ -48,3 +47,4 @@ mkdir -p $configRoot
|
|||
echo ' "external_version": "'"$extensionVersion"'"'
|
||||
echo "}"
|
||||
} | tee $configRoot/$extensionID.json
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
# Prepare
|
||||
apt install -y wget unzip jq apt-transport-https curl
|
||||
curl -fsSLo /usr/share/keyrings/brave-browser-nightly-archive-keyring.gpg https://brave-browser-apt-nightly.s3.brave.com/brave-browser-nightly-archive-keyring.gpg
|
||||
|
@ -16,3 +15,4 @@ apt install -y brave-browser-nightly
|
|||
|
||||
# Add pre-installed extensions
|
||||
sudo ln -s /opt/brave.com/brave/extensions /opt/brave.com/brave-nightly/extensions
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
# Prepare
|
||||
apt install -y wget unzip jq apt-transport-https curl
|
||||
curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
|
||||
|
@ -13,3 +12,4 @@ echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=
|
|||
# Install Brave
|
||||
apt update
|
||||
apt install -y brave-browser
|
||||
fi
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
apt-get install -y wget gpg
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
apt install -y wget gpg
|
||||
keyFile=$(mktemp)
|
||||
|
||||
wget -qO- https://packages.microsoft.com/keys/microsoft.asc \
|
||||
|
@ -17,3 +16,4 @@ echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft
|
|||
| tee /etc/apt/sources.list.d/vscode.list
|
||||
|
||||
rm -f $keyFile
|
||||
fi
|
||||
|
|
6
scripts/PopOS/software/codium.sh
Normal file → Executable file
6
scripts/PopOS/software/codium.sh
Normal file → Executable file
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
|
||||
| gpg --dearmor \
|
||||
| dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
|
||||
|
@ -14,3 +13,4 @@ echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https:/
|
|||
|
||||
apt update
|
||||
apt install -y codium
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
commandName=gnome-shell-extension-installer
|
||||
workingDirectory=$(pwd)
|
||||
contextRoot=$(mktemp -d)
|
||||
|
@ -19,3 +18,4 @@ rm -rf $contextRoot
|
|||
gnome-shell-extension-installer 779 --yes
|
||||
gnome-shell-extension-installer 4907 --yes
|
||||
killall -SIGQUIT gnome-shell
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0" "$USER"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE" "$USER"
|
||||
else
|
||||
package=$(mktemp)
|
||||
wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb -O $package
|
||||
dpkg -i $package
|
||||
|
@ -17,3 +16,4 @@ homeDir=$(sudo -u $1 bash -c 'realpath ~')
|
|||
echo "alias ll='ls -al'"
|
||||
echo "alias l='ls'"
|
||||
} | sudo -u $1 tee $homeDir/.bashrc
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0" "$USER"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE" "$USER"
|
||||
else
|
||||
bin=oh-my-posh
|
||||
workingDirectory=$(pwd)
|
||||
contextRoot=$(mktemp -d)
|
||||
|
@ -20,3 +19,4 @@ homeDir=$(sudo -u $1 bash -c 'realpath ~')
|
|||
|
||||
echo 'eval "$(oh-my-posh init bash --config ~/Nextcloud/.omp/manuel.omp.json)' \
|
||||
| sudo -u $1 tee $homeDir/.bashrc
|
||||
fi
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
apt install -y python3 python-is-python3 python3-pip
|
||||
pip install pipenv
|
||||
fi
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
package=$(mktemp)
|
||||
wget https://github.com/rclone/rclone/releases/download/v1.60.0/rclone-v1.60.0-linux-amd64.deb -O $package
|
||||
dpkg -i $package
|
||||
rm -f $package
|
||||
|
||||
cp ./rclone@.service /etc/systemd/user
|
||||
fi
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
sudo bash "$BASH_SOURCE"
|
||||
else
|
||||
workingDirectory=$(pwd)
|
||||
contextRoot=$(mktemp)
|
||||
cd $contextRoot
|
||||
|
@ -14,3 +13,4 @@ install tea /usr/local/bin
|
|||
|
||||
cd $workingDirectory
|
||||
rm -rf $contextRoot
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue