mirror of
https://github.com/oleid/gnome-shell-teatime.git
synced 2022-04-29 18:53:50 +00:00
Change default installation to home directory; fix global schema installation
This commit is contained in:
parent
0602a89ec3
commit
a7efce596d
@ -1,7 +1,7 @@
|
||||
Run install.sh without any arguments to install the extension for all the users.
|
||||
Run install.sh without any arguments to install the extension into your home directory.
|
||||
|
||||
If you want to install the extension only for the current user, run
|
||||
If you want to install the extension for all users, run
|
||||
|
||||
install.sh local
|
||||
install.sh global
|
||||
|
||||
instead.
|
||||
|
17
install.sh
17
install.sh
@ -1,12 +1,16 @@
|
||||
NAME="TeaTime@oleid.mescharet.de"
|
||||
|
||||
if [ "$1" = "local" ] ; then
|
||||
if [ "$1" != "global" ] ; then
|
||||
INST_DIR="$HOME/.local/share/gnome-shell/extensions/$NAME"
|
||||
SUDO=""
|
||||
|
||||
echo "Installing extension locally..."
|
||||
else
|
||||
INST_DIR="/usr/share/gnome-shell/extensions/$NAME"
|
||||
SUDO="sudo"
|
||||
|
||||
echo "Installing extension globally..."
|
||||
|
||||
echo "Installing icon"
|
||||
$SUDO cp utilities-teatime.svg /usr/share/icons/hicolor/scalable/apps/
|
||||
$SUDO gtk-update-icon-cache /usr/share/icons/hicolor/
|
||||
@ -14,11 +18,14 @@ fi
|
||||
|
||||
|
||||
echo "Installing extension"
|
||||
glib-compile-schemas schemas
|
||||
$SUDO mkdir -p "$INST_DIR"
|
||||
|
||||
$SUDO cp -ax *.js *.json schemas "$INST_DIR"
|
||||
$SUDO cp *.js *.json "$INST_DIR"
|
||||
|
||||
if [ "$1" = "local" ]; then
|
||||
$SUDO cp *.svg "$INST_DIR"
|
||||
if [ "$1" != "global" ]; then
|
||||
$SUDO cp -ax *.svg schemas "$INST_DIR"
|
||||
else
|
||||
echo "Installing schema"
|
||||
$SUDO cp schemas/*.xml /usr/share/glib-2.0/schemas/ && \
|
||||
$SUDO glib-compile-schemas /usr/share/glib-2.0/schemas/ 2> /dev/null
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user