File: .extract.sh

package info (click to toggle)
gnome-shell-extension-bluetooth-quick-connect 16-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 172 kB
  • sloc: javascript: 502; xml: 29; makefile: 10
file content (29 lines) | stat: -rwxr-xr-x 565 bytes parent folder | download
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
#!/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"