mirror of https://github.com/zulip/zulip.git
pack-local-script: Match mode of file outside of packing.
This commit is contained in:
parent
5672595c2a
commit
b1f899512a
|
@ -13,10 +13,12 @@ set -eu
|
|||
var="$1"
|
||||
file="$2"
|
||||
|
||||
mode="$(stat -c "%a" "$file")"
|
||||
|
||||
encoded="$(gzip --stdout "$file" | base64)"
|
||||
cat <<embedded-shell-output
|
||||
$var="\$(mktemp)"
|
||||
chmod 755 "\$$var"
|
||||
chmod "$mode" "\$$var"
|
||||
base64 -d <<"encoded-shell-script" | gzip -d > "\$$var"
|
||||
$encoded
|
||||
encoded-shell-script
|
||||
|
|
Loading…
Reference in New Issue