Skip to content

Commit 9411674

Browse files
authored
Merge pull request #38 from bedroge/fix_umask_issue_new_dirs
Fix permission issue for newly created dirs/files in `install_scripts.sh`
2 parents 40d5bd0 + b6e45d7 commit 9411674

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)