mirror of
https://github.com/sigmasternchen/Anineko
synced 2025-03-15 03:28:57 +00:00
added install script (untested)
This commit is contained in:
parent
9461fd460f
commit
c03a33cfe6
1 changed files with 45 additions and 0 deletions
45
install
Executable file
45
install
Executable file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Welcome to the Anineko install/update-script."
|
||||
|
||||
if test $(id -u) != 0; then
|
||||
echo "Error: Not permitted. You need to be root in order to execute this script."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
check() {
|
||||
text=" $1..."
|
||||
echo $text
|
||||
for i in $(seq ${#text} 20); do
|
||||
echo -n " "
|
||||
done
|
||||
which $1 2>&1 > /dev/null
|
||||
if test $? = 0; then
|
||||
echo -e "[ \033[32mpass\033[0m ]"
|
||||
return 0
|
||||
else
|
||||
echo -e "[ \033[31mfail\033[0m ]"
|
||||
echo "Please resolve dependency problemes and retry."
|
||||
exit 3
|
||||
fi
|
||||
}
|
||||
|
||||
echo
|
||||
echo "Checking dependencies..."
|
||||
check wget
|
||||
check grep
|
||||
check egrep
|
||||
check sed
|
||||
check awk
|
||||
|
||||
echo
|
||||
echo "The latest version of Anineko will now be downloaded to /usr/bin/."
|
||||
echo "Press [enter] to continue. Press [Ctrl] + C to abort."
|
||||
read
|
||||
|
||||
wget -O /usr/bin/anineko "https://raw.githubusercontent.com/overflowerror/Anineko/master/anineko" --progress=bar:force 2>&1 | tail -f -n +12
|
||||
|
||||
echo
|
||||
echo "Download complete. Have fun with Anineko. :3"
|
||||
|
||||
exit 0
|
Loading…
Reference in a new issue