From 2ebe7c56c95da92728f55ffc07560c12864f3a81 Mon Sep 17 00:00:00 2001 From: Ivan Ilves Date: Mon, 5 Jun 2017 11:27:17 +0200 Subject: [PATCH] Add Makefile with install/unistall tasks --- INSTALL-HELP.txt | 9 +++++++++ Makefile | 15 +++++++++++++++ wrapper | 4 ++++ 3 files changed, 28 insertions(+) create mode 100644 INSTALL-HELP.txt create mode 100644 Makefile create mode 100644 wrapper diff --git a/INSTALL-HELP.txt b/INSTALL-HELP.txt new file mode 100644 index 0000000..57b282f --- /dev/null +++ b/INSTALL-HELP.txt @@ -0,0 +1,9 @@ +Run: + +* "sudo make install" to install xiringuito + +* "sudo make unistall" to uninstall xiringuito + +HINT: +By default it will install software into `/usr/local/xiringuito` path +and will add 2 wrappers, xiringuito and xaval, into `/usr/local/bin`. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8fe805d --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +INSTALL_PATH=/usr/local/xiringuito +WRAPPER_PATH=/usr/local/bin + +help: + @cat INSTALL-HELP.txt + +install: + rsync -a ./ $(INSTALL_PATH)/ + install -o root -g root -m 0755 wrapper $(WRAPPER_PATH)/xiringuito + install -o root -g root -m 0755 wrapper $(WRAPPER_PATH)/xaval + sed -i "s|__INSTALL_PATH__|$(INSTALL_PATH)|g" $(WRAPPER_PATH)/xiringuito $(WRAPPER_PATH)/xaval + +uninstall: + rm $(WRAPPER_PATH)/xiringuito $(WRAPPER_PATH)/xaval + rm -r $(INSTALL_PATH) diff --git a/wrapper b/wrapper new file mode 100644 index 0000000..6a0e0fd --- /dev/null +++ b/wrapper @@ -0,0 +1,4 @@ +#/usr/bin/env bash + +cd __INSTALL_PATH__ +./$(basename ${0}) ${@}