diff options
author | ache <ache@ache.one> | 2017-08-20 00:22:46 +0000 |
---|---|---|
committer | ache <ache@ache.one> | 2017-08-20 00:23:01 +0000 |
commit | e499de5e023d991e6141cedb5bf2d865c7585efa (patch) | |
tree | 4f147e23b5a5a001f6f01067c92290ab960f5fb6 | |
parent | t# Ceci est la combinaison de 2 commits. (diff) |
Fix makefile install
-rw-r--r-- | makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -22,8 +22,12 @@ mrpropest: mrproper cp ./todo /usr/bin/ install: todo - [ -e /usr/bin/todo ] && sudo cp todo /usr/bin/todo - echo 'Installation success' + @if [ `id -u` == "0" ] ; then cp -f todo /usr/bin/todo ; else \ + if which sudo > /dev/null ; then sudo cp -f todo /usr/bin/todo ; else \ + @echo must be run by superuser ;\ + fi \ + fi + @echo 'Installation success' uninstall: /usr/bin/todo rm /usr/bin/todo |