1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/bash
# exit, if a command fails
set -e
# cd to repo dir
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
cd $SCRIPT_DIR/../
# create extension zip including the schemas and translations
echo Packaging extension...
gnome-extensions pack tiling-assistant@leleat-on-github \
--force \
--podir="../translations" \
--extra-source="src" \
--extra-source="media"
echo Packaging complete.
echo
while getopts i FLAG; do
case $FLAG in
i) echo Installing extension...
gnome-extensions install --force tiling-assistant@leleat-on-github.shell-extension.zip && \
rm -f tiling-assistant@leleat-on-github.shell-extension.zip && \
echo Installation complete. Restart GNOME Shell and enable the extension to use it. || \
exit 1;;
*) echo Don\'t use any flags to just create an extension package. Use \'-i\' to additionally install the extension.
exit 1;;
esac
done
|