Ensure all gnome-extensions are available and enabled
This commit is contained in:
parent
5b46f1fda5
commit
c2405e47b4
1 changed files with 27 additions and 15 deletions
|
@ -1,21 +1,33 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Elevate script
|
commandName=gnome-shell-extension-installer
|
||||||
if [ ! "$UID" -eq 0 ]
|
extensionLocation=/usr/share/gnome-shell/extensions
|
||||||
then
|
workingDirectory=$(pwd)
|
||||||
sudo bash "$BASH_SOURCE"
|
contextRoot=$(mktemp -d)
|
||||||
else
|
cd "$contextRoot"
|
||||||
commandName=gnome-shell-extension-installer
|
|
||||||
|
wget -O "$commandName" "https://github.com/brunelli/gnome-shell-extension-installer/raw/master/gnome-shell-extension-installer"
|
||||||
|
sudo install "$commandName" /usr/local/bin
|
||||||
|
|
||||||
|
cd "$workingDirectory"
|
||||||
|
rm -rf "$contextRoot"
|
||||||
|
|
||||||
|
for id in 779 4907
|
||||||
|
do
|
||||||
workingDirectory=$(pwd)
|
workingDirectory=$(pwd)
|
||||||
contextRoot=$(mktemp -d)
|
contextRoot=$(mktemp -d)
|
||||||
cd $contextRoot
|
unzipLocation=$(mktemp -d)
|
||||||
|
cd "$contextRoot"
|
||||||
|
|
||||||
wget -O $commandName "https://github.com/brunelli/gnome-shell-extension-installer/raw/master/gnome-shell-extension-installer"
|
gnome-shell-extension-installer $id --no-install
|
||||||
install $commandName /usr/local/bin
|
sudo gnome-shell-extension-installer $id --yes
|
||||||
|
unzip ./*.zip -d "$unzipLocation"
|
||||||
|
uuid=$(jq -r '.uuid' "$unzipLocation/metadata.json")
|
||||||
|
|
||||||
cd $workingDirectory
|
sudo chmod -R +r "$extensionLocation/$uuid"
|
||||||
rm -rf $contextRoot
|
gnome-extensions enable "$uuid"
|
||||||
|
|
||||||
gnome-shell-extension-installer 779 --yes
|
cd "$workingDirectory"
|
||||||
gnome-shell-extension-installer 4907 --yes
|
rm -rf "$contextRoot"
|
||||||
killall -SIGQUIT gnome-shell
|
done
|
||||||
fi
|
|
||||||
|
killall -SIGQUIT gnome-shell
|
||||||
|
|
Loading…
Reference in a new issue