Skip to content

Commit

Permalink
Create install.sh
Browse files Browse the repository at this point in the history
Added install.sh script since unable to create meson for the meantime
  • Loading branch information
rizalmart authored Nov 22, 2023
1 parent c3c360f commit 43966b8
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
#gTock script installer.

if [ "$(whoami)" != "root" ]; then
exec sudo $0
fi

prompt_yes_no() {
while true; do
read -p "$1 (yes/no): " answer
case $answer in
[Yy]* ) return 0;;
[Nn]* ) return 1;;
* ) echo "Please answer yes or no.";;
esac
done
}


if prompt_yes_no "This installer will install gTock. Do you want to proceed?"; then
echo "Installing gTock...."
else
echo "Installation cancelled"
exit 1
fi


script_dir=$(realpath $(dirname "$0"))

if [ ! -d $script_dir/gtock-src ]; then
echo "gtock source files was missing"
exit 1
fi

cp -rf $script_dir/gtock-src/* /

glib-compile-schemas /usr/share/glib-2.0/schemas/

echo "gTock installation complete!

0 comments on commit 43966b8

Please sign in to comment.