From ec77576d0a8303c6bf9395075bd2c813f2bfa9ee Mon Sep 17 00:00:00 2001 From: pvincent Date: Sun, 10 Sep 2023 08:54:28 +0400 Subject: [PATCH] install.sh --- src/install.sh | 16 ++++++++++++++++ src/main | 1 - 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 src/install.sh diff --git a/src/install.sh b/src/install.sh new file mode 100755 index 0000000..79da8f5 --- /dev/null +++ b/src/install.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +echo "install on: $HOSTNAME" +echo ---------------------- + +[ "$(id -u)" -eq 0 ] && echo 'normal user required: ie, not !' && exit 1 + +if [[ ! $PWD == '/opt/debian-gnome' ]]; then + # download and fullfill /opt/debian-bash, then run it from folder + + if [[ ! -L /opt/debian-gnome ]]; then + sudo rm -rf /opt/debian-gnome + sudo git clone --depth=1 https://git.artcode.re/pvincent/debian-gnome /opt/debian-gnome + fi + /opt/debian-gnome/src/main +fi diff --git a/src/main b/src/main index 3949126..fc4138b 100755 --- a/src/main +++ b/src/main @@ -188,7 +188,6 @@ echo "================" if [[ ! -d /usr/share/goldendict/dicts ]]; then sudo git clone --depth 1 https://git.artcode.re/non-free/dicts.git /usr/share/goldendict/dicts fi - if [[ ! -f $HOME/.config/goldendict/config ]] || ! grep -q "path.*/usr/share/goldendict/dicts" $HOME/.config/goldendict/config; then mkdir -p "$HOME/.config/goldendict/" cp "$BASEDIR/lib/goldendict/config" "$HOME/.config/goldendict/"