From 1f82914dc5097cc881b717fb5ac3e5ed2b3ad7e3 Mon Sep 17 00:00:00 2001 From: Antoine COMBET Date: Thu, 4 Nov 2021 21:57:44 +0100 Subject: [PATCH] Created an install script --- install.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..381c8df --- /dev/null +++ b/install.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ "$1" = "-h" ] +then + echo "Usage:" + echo $0 + echo " install in default location (/usr/local)" + echo " may require root privileges" + echo "$0 " + echo " install at the specified prefix" + exit 1; +fi + +if [ "s$1" = "s" ] +then + INSTALL_PREFIX=/usr/local +else + INSTALL_PREFIX=$1 +fi + +install -m 644 ./todo.1 $INSTALL_PREFIX/share/man/man1/todo.1 +install -m 755 ./todo $INSTALL_PREFIX/bin/todo