]> git.g-eek.se Git - users/gustav/scripts.git/commitdiff
[repo-encrypt] Updated for Mac
authorGustav Eek <gustav.eek@etraveli.com>
Sun, 28 Jun 2015 18:47:01 +0000 (20:47 +0200)
committerGustav Eek <gustav.eek@etraveli.com>
Sun, 28 Jun 2015 18:47:33 +0000 (20:47 +0200)
The Mac version of the *cp* command can not handle .
The flag  is a replacement.

Makefile
repo-encrypt

index db29e8d5d9616b98c8228543d3f8df6ea111444c..8fc6a36f3837aefa1676d1365feae4a8f101db4e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 # terms of the GNU General Public License
 
 SHELL = /bin/bash
-INSTALL = ~/bin
+INSTALL = $(HOME)/bin
 
 scripts = \
 msmtp-notify \
@@ -11,7 +11,7 @@ repo-encrypt \
 bash-completion = \
 repo-encrypt \
 
-dir := $(abspath $(wildcard $(INSTALL)))
+dir := $(INSTALL)
 dir-completion := $(dir)/bash_completion.d
 
 default: help
index 1e59c71d7575c15be94722b79aec1ae9c8678a5a..6ae21a86b5d2119d5a9a5b06a00b8a8a66120f09 100755 (executable)
@@ -45,7 +45,7 @@ if [ $1 == encrypt ]; then
     parent="$(pwd | sed -e 's:^/.*/\(.*$\):\1:')"
     tmp_dir="/tmp/${0##*/}-$$"
     mkdir "$tmp_dir"
-    cp --recursive .git "$tmp_dir/$parent.git"
+    cp -R .git "$tmp_dir/$parent.git"
     tar --directory "$tmp_dir" --create --file "$tmp_dir/$parent.git.tar" "$parent.git"
     gpg --encrypt --recipient "$user" < "$tmp_dir/$parent.git.tar" > "$destination/$parent.git.tar.gpg"
     rm -fr "$tmp_dir"