Merge a3762d3e0036fd5adb904a1af1a8fb69f1f95d0b into 49ae1125d3c1eb8aef99bdef283ce18278f40668
This commit is contained in:
commit
7453481246
34
install.sh
Executable file
34
install.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
#------------------------------------------------
|
||||
# Installation script for botany
|
||||
# Please run as superuser
|
||||
#------------------------------------------------
|
||||
|
||||
PREFIX="/usr"
|
||||
|
||||
error_exit() {
|
||||
echo -e "Botany Install: ${1:-"Unknown Error"}" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
[[ $(id -u) != 0 ]] && error_exit "You must be root to run this script."
|
||||
|
||||
cp -r $PWD $PREFIX/share/
|
||||
chmod 755 $PREFIX/share/botany
|
||||
rm -f $PREFIX/share/botany/install.sh
|
||||
chmod 755 $PREFIX/share/botany/art
|
||||
chmod 644 $PREFIX/share/botany/art/*
|
||||
chmod 644 $PREFIX/share/botany/*.py
|
||||
chmod 755 $PREFIX/share/botany/botany.py
|
||||
chmod 666 $PREFIX/share/botany/testsql.py
|
||||
|
||||
ln -s $PREFIX/share/botany/botany.py $PREFIX/bin/botany
|
||||
|
||||
$PREFIX/bin/botany &
|
||||
sleep 3
|
||||
pkill botany
|
||||
|
||||
chmod 755 $PREFIX/share/botany/sqlite
|
||||
chmod 666 $PREFIX/share/botany/sqlite/garden_db.sqlite
|
||||
|
||||
echo "Botany has been installed! Simply run 'botany' to get started!"
|
Loading…
x
Reference in New Issue
Block a user