Change default installation to home directory; fix global schema installation

This commit is contained in:
Olaf Leidinger 2013-05-22 08:09:59 +02:00
parent 0602a89ec3
commit a7efce596d
2 changed files with 15 additions and 8 deletions

View File

@ -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.

View File

@ -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