The Mac version of the *cp* command can not handle .
The flag is a replacement.
# terms of the GNU General Public License
SHELL = /bin/bash
-INSTALL = ~/bin
+INSTALL = $(HOME)/bin
scripts = \
msmtp-notify \
bash-completion = \
repo-encrypt \
-dir := $(abspath $(wildcard $(INSTALL)))
+dir := $(INSTALL)
dir-completion := $(dir)/bash_completion.d
default: help
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"