Begin reimplement gex to use generated bindings and dbus xml

This commit is contained in:
Luke D. Jones
2023-06-28 21:54:17 +12:00
parent 439c830311
commit 4d2d5707a1
31 changed files with 2744 additions and 10 deletions

View File

@@ -0,0 +1,45 @@
#!/bin/sh
isdev=false
for arg in "$@"; do
if [ "$arg" = "dev" ]; then
isdev=true
fi;
done
INSTALLBASE=~/.local/share/gnome-shell/extensions
UUID=`grep -E '^[ ]*"uuid":' _build/metadata.json | sed 's@^[ ]*"uuid":[ ]*"\(.\+\)",[ ]*@\1@'`
UUIDDEV=`grep -E '^[ ]*"uuid-dev":' _build/metadata.json | sed 's@^[ ]*"uuid-dev":[ ]*"\(.\+\)",[ ]*@\1@'`
GV=`gnome-shell --version | awk '{print $3}'`
if $isdev
then
sed -i "s/${UUID}/${UUIDDEV}/g" _build/metadata.json
rm -fr "${INSTALLBASE}/${UUID}"
UUID=$UUIDDEV
else
rm -fr "${INSTALLBASE}/${UUIDDEV}"
fi
if [ -d "${INSTALLBASE}/${UUID}" ]; then
rm -rf "${INSTALLBASE}/${UUID}/*"
else
mkdir -p "${INSTALLBASE}/${UUID}"
fi
cp -r _build/* "${INSTALLBASE}/${UUID}/"
gnome-extensions info "${UUID}"
INSTALLED="$?"
if [ "$INSTALLED" -eq 0 ]; then
echo "reset"
gnome-extensions reset "${UUID}"
echo "enable"
gnome-extensions enable "${UUID}"
echo "Please restart GNOME Shell if you are on X11 or logout and login again when you use Wayland."
else
echo "You probably install the extension for the first time. Please restart GNOME Shell or Logout and enable the extension via the Extensions app or extensions.gnome.org."
fi
exit 0;