-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added install.sh script since unable to create meson for the meantime
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! | ||