From eb8c309626444da9b8b64fd42d47ea5ad7114445 Mon Sep 17 00:00:00 2001 From: Benjamin Levy Date: Fri, 20 Jul 2018 17:49:03 -0400 Subject: [PATCH 1/2] Update the Makefile to comply with the DESTDIR/PREFIX convention --- Makefile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 472ffc2d..a9c5a6f5 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,20 @@ +PREFIX = /usr/local + .DEFAULT_GOAL := setup setup: - sudo pip3 install -r requirements.txt + pip3 install -r requirements.txt install: - sudo rm -rf /usr/share/onionr/ - sudo rm -f /usr/bin/onionr - sudo cp -rp ./onionr /usr/share/onionr - sudo sh -c "echo \"#!/bin/sh\ncd /usr/share/onionr/\n./onionr.py \\\"\\\$$@\\\"\" > /usr/bin/onionr" - sudo chmod +x /usr/bin/onionr - sudo chown -R `whoami` /usr/share/onionr/ + cp -rfp ./onionr $(DESTDIR)$(PREFIX)/share/onionr + echo '#!/bin/sh' > $(DESTDIR)$(PREFIX)/bin/onionr + echo 'cd $(DESTDIR)$(PREFIX)/share/onionr' > $(DESTDIR)$(PREFIX)/bin/onionr + echo './onionr \\\"\\\$$@\\\"\"' > $(DESTDIR)$(PREFIX)/bin/onionr + chmod +x $(DESTDIR)$(PREFIX)/bin/onionr uninstall: - sudo rm -rf /usr/share/onionr - sudo rm -f /usr/bin/onionr + rm -rf $(DESTDIR)$(PREFIX)/share/onionr + rm -f $(DESTDIR)$(PREFIX)/bin/onionr test: @./RUN-LINUX.sh stop From e59d4645e1e7662afc91042090f0712cf95d1084 Mon Sep 17 00:00:00 2001 From: Benjamin Levy Date: Fri, 20 Jul 2018 17:55:03 -0400 Subject: [PATCH 2/2] Fix onionr start script --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a9c5a6f5..cb290800 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ install: cp -rfp ./onionr $(DESTDIR)$(PREFIX)/share/onionr echo '#!/bin/sh' > $(DESTDIR)$(PREFIX)/bin/onionr echo 'cd $(DESTDIR)$(PREFIX)/share/onionr' > $(DESTDIR)$(PREFIX)/bin/onionr - echo './onionr \\\"\\\$$@\\\"\"' > $(DESTDIR)$(PREFIX)/bin/onionr + echo './onionr "$$@"' > $(DESTDIR)$(PREFIX)/bin/onionr chmod +x $(DESTDIR)$(PREFIX)/bin/onionr uninstall: