Switched to a makefile-based solution

This commit is contained in:
2021-10-11 11:24:13 +02:00
parent 02c007ddc6
commit 02dfd47558
2 changed files with 34 additions and 2 deletions

26
Makefile Normal file
View File

@ -0,0 +1,26 @@
all:
echo "Compiling"
gcc -o ropipe ropipe.c
install:
ifeq (,$(wildcard ./ropipe))
make
endif
ifneq ($(shell id -u), 0)
@echo "You must be root to install"
else
mkdir -p /usr/local/share/man/man1/
echo "Copying man file"
cp ropipe.1 /usr/local/share/man/man1/ropipe.1
echo "Installing binary"
cp ropipe /usr/bin/ropipe
endif
uninstall:
ifneq ($(shell id -u), 0)
@echo "You must be root to uninstall"
else
mkdir -p /usr/local/share/man/man1/
echo "Removing man file"
rm -rf /usr/local/share/man/man1/ropipe.1
echo "Uninstalling binary"
rm -rf /usr/bin/ropipe
endif