mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 19:43:47 +00:00
pack-local-script: Match mode of file outside of packing.
This commit is contained in:
committed by
Tim Abbott
parent
5672595c2a
commit
b1f899512a
0
puppet/kandra/files/install-ssh-authorized-keys
Normal file → Executable file
0
puppet/kandra/files/install-ssh-authorized-keys
Normal file → Executable file
0
puppet/kandra/files/install-ssh-keys
Normal file → Executable file
0
puppet/kandra/files/install-ssh-keys
Normal file → Executable file
@@ -13,10 +13,12 @@ set -eu
|
|||||||
var="$1"
|
var="$1"
|
||||||
file="$2"
|
file="$2"
|
||||||
|
|
||||||
|
mode="$(stat -c "%a" "$file")"
|
||||||
|
|
||||||
encoded="$(gzip --stdout "$file" | base64)"
|
encoded="$(gzip --stdout "$file" | base64)"
|
||||||
cat <<embedded-shell-output
|
cat <<embedded-shell-output
|
||||||
$var="\$(mktemp)"
|
$var="\$(mktemp)"
|
||||||
chmod 755 "\$$var"
|
chmod "$mode" "\$$var"
|
||||||
base64 -d <<"encoded-shell-script" | gzip -d > "\$$var"
|
base64 -d <<"encoded-shell-script" | gzip -d > "\$$var"
|
||||||
$encoded
|
$encoded
|
||||||
encoded-shell-script
|
encoded-shell-script
|
||||||
|
|||||||
Reference in New Issue
Block a user