summaryrefslogtreecommitdiff
path: root/extract.sh
diff options
context:
space:
mode:
authorBartosz Jaroszewski <b.jarosze@gmail.com>2020-05-16 14:41:28 +0200
committerBartosz Jaroszewski <b.jarosze@gmail.com>2020-05-16 22:59:41 +0200
commit77f1f7685c9b82b9bdaf9359e123afb12210b22b (patch)
tree76eb22e2d07930ced5d64ebdc5dae51dcdaf7445 /extract.sh
parent9986e428660d4aa8b22d94317282082bf844371d (diff)
add refresh button
Diffstat (limited to 'extract.sh')
-rwxr-xr-xextract.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/extract.sh b/extract.sh
new file mode 100755
index 0000000..a4578fe
--- /dev/null
+++ b/extract.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+if [[ $# -ne 1 ]]; then
+ echo "usage $0 dir" >&2
+ exit 1
+fi
+
+dir="$1"
+
+if [[ -e $dir ]]; then
+ echo "Error: $dir already exists" >&2
+ exit 1
+fi
+
+mkdir -p "$dir"
+cd "$dir"
+
+GS=/usr/lib/gnome-shell/libgnome-shell.so
+
+for r in $(gresource list $GS); do
+ t="${r/#\/org\/gnome\/shell\/}"
+ mkdir -p $(dirname $t)
+ echo Extracting $t
+ gresource extract $GS $r >$t
+done
+
+echo
+echo "Now add the following to /etc/environment and restart gnome-shell"
+echo "if you want to run with these extracted source files."
+echo "GNOME_SHELL_JS=$PWD"