sup rev 13
Fix for invalid user
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Feb 26 16:58:24 2017 +0100 (2017-02-26) |
parents | 90e556840716 |
children | 332073f2e5de |
files | Makefile sup |
line diff
1.1 --- a/Makefile Sun Feb 26 13:37:42 2017 +0100 1.2 +++ b/Makefile Sun Feb 26 16:58:24 2017 +0100 1.3 @@ -35,7 +35,7 @@ 1.4 1.5 # Installation 1.6 1.7 -install-clients: 1.8 +install: 1.9 install -m 0755 -d $(DESTDIR)$(PREFIX)/bin 1.10 install -m 0755 -d $(DESTDIR)$(PREFIX)/lib/slitaz 1.11 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications 1.12 @@ -61,9 +61,10 @@ 1.13 1.14 # Uninstallation 1.15 1.16 -uninstall-clients: 1.17 +uninstall: 1.18 rm -f $(DESTDIR)$(PREFIX)/bin/sup 1.19 rm -f $(DESTDIR)$(PREFIX)/lib/slitaz/libsup.sh 1.20 + rm -f $(DESTDIR)$(PREFIX)/share/applications/sup 1.21 rm -f $(DESTDIR)$(PREFIX)/share/applications/sup-*.desktop 1.22 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/sup-client.mo 1.23
2.1 --- a/sup Sun Feb 26 13:37:42 2017 +0100 2.2 +++ b/sup Sun Feb 26 16:58:24 2017 +0100 2.3 @@ -12,8 +12,8 @@ 2.4 fi 2.5 2.6 # Sanity check 2.7 -if [ ! "/home/$USER" ]; then 2.8 - gettext "Not a valid user: "; echo "id $(id -u)" && exit 1 2.9 +if ! [ -d "/home/$(id -un)" ]; then 2.10 + gettext "Not a valid user:"; colorize 31 " $(id -un)" && exit 1 2.11 fi 2.12 mkdir -p ${cache} ${installed} 2.13