Add install script
This commit is contained in:
parent
e6010080ac
commit
7d70f164ff
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
DIST="me.fier.gawk"
|
||||
PRETTY_DIST="gawk"
|
||||
INSTALL_PATH="/opt"
|
||||
EXECUTABLE="gawk.py"
|
||||
LAUNCHER_PATH="/usr/local/share/applications"
|
||||
ICON_PATH="/usr/share/icons"
|
||||
|
||||
if [ "$1" = "-u" ]; then
|
||||
INSTALL_PATH="$HOME/.local/opt"
|
||||
LAUNCHER_PATH="$HOME/.local/share/applications"
|
||||
ICON_PATH="$HOME/.icons"
|
||||
fi
|
||||
|
||||
LAUNCHER_FILE="\
|
||||
[Desktop Entry]
|
||||
Name=$PRETTY_DIST
|
||||
GenericName=Web Browser
|
||||
Exec=$INSTALL_PATH/$DIST/$EXECUTABLE %u
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GTK;WebBrowser;Network
|
||||
Icon=$dist
|
||||
MimeType=x-scheme-handler/unknown;x-scheme-handler/about;x-scheme-handler/https;x-scheme-handler/http;text/html;image/gif;image/jpeg;image/png;image/webp;video/webm;\
|
||||
"
|
||||
|
||||
if [ -d "$INSTALL_PATH/$DIST" ]; then
|
||||
rm -rf "$INSTALL_PATH/$DIST"
|
||||
fi
|
||||
|
||||
mkdir -p "$INSTALL_PATH/$DIST"
|
||||
cp -r . "$INSTALL_PATH/$DIST"
|
||||
|
||||
mkdir -p "$ICON_PATH"
|
||||
cp "$INSTALL_PATH/$DIST/user/addon/favicon/default.png" "$ICON_PATH/$dist.png"
|
||||
|
||||
mkdir -p "$LAUNCHER_PATH"
|
||||
echo "$LAUNCHER_FILE" > "$LAUNCHER_PATH/$DIST.desktop"
|
||||
chmod +x "$LAUNCHER_PATH/$DIST.desktop"
|
|
@ -1,4 +1,6 @@
|
|||
Gawk is a minimal browser. It opens the page you give as the first argument and gives you a default WebKit browser. Any further functionality has to be added/replaced with addons.
|
||||
|
||||
Prerequisites:
|
||||
sudo apt install python3-munch python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-webkit2-4.0
|
||||
sudo apt install python3-munch python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-webkit2-4.0
|
||||
|
||||
You can either run gawk.py directly from where it is, or you can install the browser with `sudo ./install.sh`. For a user-wide install, do `./install.sh -u`.
|
||||
|
|
Loading…
Reference in New Issue