]> arthur.barton.de Git - ax-unix.git/blobdiff - bup/save-user/Makefile
Makefile's: Only create non-existing directories
[ax-unix.git] / bup / save-user / Makefile
index ecc879607d52891f4c92380b52e66255ca8e8d67..c442bd9d0e5062c4bc3c5c3bc4e806ca64d08bee 100644 (file)
@@ -1,6 +1,6 @@
 #
 # ax-unix: Alex' UNIX Tools & Scripts
-# Copyright (c)2013-2014 Alexander Barton (alex@barton.de)
+# Copyright (c)2013-2016 Alexander Barton (alex@barton.de)
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,7 +13,8 @@ ALL = bup-save-user
 include ../../Makefile.ax
 
 install-local: bup-save-user
-       install -d -o $(USER) -g $(GROUP) -m 755 \
-        $(DESTDIR)$(PREFIX)/bin
-       install -p -o $(USER) -g $(GROUP) -m 755 bup-save-user \
-        $(DESTDIR)$(PREFIX)/bin/bup-save-user
+       [ -d "$(DESTDIR)$(PREFIX)/bin" ] || \
+               install -d -o "$(USER)" -g "$(GROUP)" -m 755 \
+                "$(DESTDIR)$(PREFIX)/bin"
+       install -p -o "$(USER)" -g "$(GROUP)" -m 755 bup-save-user \
+        "$(DESTDIR)$(PREFIX)/bin/bup-save-user"