Fixed Alpine compatibility (chmod) (#212)
This commit is contained in:
committed by
Tom Limoncelli
parent
74c6d34721
commit
9165a77d15
@@ -443,7 +443,11 @@ function cp_permissions() {
|
|||||||
chmod $( stat -f '%p' "$1" | sed -e "s/^100//" ) "${@:2}"
|
chmod $( stat -f '%p' "$1" | sed -e "s/^100//" ) "${@:2}"
|
||||||
;;
|
;;
|
||||||
Linux | CYGWIN* | MINGW* )
|
Linux | CYGWIN* | MINGW* )
|
||||||
chmod --reference "$1" "${@:2}"
|
if [[ -e /etc/alpine-release ]]; then
|
||||||
|
chmod $( stat -c '%a' "$1" ) "${@:2}"
|
||||||
|
else
|
||||||
|
chmod --reference "$1" "${@:2}"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
echo 'ERROR: Unknown OS. Exiting. (cp_permissions)'
|
echo 'ERROR: Unknown OS. Exiting. (cp_permissions)'
|
||||||
|
|||||||
Reference in New Issue
Block a user