Skip to content

Commit b6e45d7

Browse files
committed
use umask+cat instead of cp
1 parent 40d5bd0 commit b6e45d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

install_scripts.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ compare_and_copy() {
8080
else
8181
echo "File has changed in the PR"
8282
fi
83-
cp "$source_file" "$destination_file"
83+
# Use cat to retain existing permissions, set umask to world readable in case the target file does not yet exist.
84+
(umask 022 && cat "$source_file" > "$destination_file")
8485
echo "File $source_file copied to $destination_file"
8586
else
8687
case $? in

0 commit comments

Comments
 (0)