Sadly, longopts like --verbose are not working on MacOS for cp, mkdir and rm. also -u was not supported for cp. alternative is rsync

https://superuser.com/questions/515373/cp-u-is-illegal-on-mac-what-are-the-alternatives
This commit is contained in:
Kunal Dabir 2019-04-04 16:13:56 +05:30
parent 36e11e238f
commit 53ab06dd03
1 changed files with 7 additions and 5 deletions

View File

@ -1,5 +1,7 @@
# Makefile for has
# https://github.com/kdabir/has
# Sadly, longopts like --verbose are not working on MacOS for cp, mkdir and rm
# PREFIX is an environment variable.
# Use default value if not set.
@ -14,11 +16,11 @@ has :
# ensure 'has' in repo
git checkout --force -- has
# install 'has' in specified directory
install : has
# install 'has' in specified directory
chmod 755 has && \
mkdir --verbose --parents $(DESTDIR)$(PREFIX)/bin && \
cp --verbose --update has $(DESTDIR)$(PREFIX)/bin/has
mkdir -v -p $(DESTDIR)$(PREFIX)/bin && \
cp -v has $(DESTDIR)$(PREFIX)/bin/has
# update: has
update : update-fetch has
@ -29,10 +31,10 @@ update-fetch : update-force
update-force :
# remove local repo 'has' to force update
rm --force has
rm -f has
uninstall :
rm --force /usr/local/bin/has
rm -f /usr/local/bin/has
.PHONY: test install uninstall update