Install and uninstall scripts.

This commit is contained in:
Nicolás A. Ortega Froysa 2021-03-03 18:54:12 +01:00
parent 942737cd4a
commit bd3e48256f
2 changed files with 22 additions and 0 deletions

16
install Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
if ! [ -f target/release/indivisible ]
then
echo "ERROR: you have to compile a release build of indivisible first."
echo "Please run 'cargo build --release'"
exit 1
fi
PREFIX="/usr/local"
echo "Installing ./target/release/indivisible to $PREFIX/bin/"
install -m 755 ./target/release/indivisible $PREFIX/bin/
gzip -c indivisible.1 > indivisible.1.gz
echo "Installing manpage to $PREFIX/share/man/man1/"
install -m 644 indivisible.1.gz $PREFIX/share/man/man1/
rm indivisible.1.gz

6
uninstall Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
PREFIX="/usr/local"
echo "Remove $PREFIX/bin/indivisible"
rm -f $PREFIX/bin/indivisible
echo "Remove $PREFIX/local/man/man1/indivisible.1.gz"
rm -f $PREFIX/local/man/man1/indivisible.1.gz