Skip to content

Commit 910a506

Browse files
committed
- Improve setup with explicit permissions
1 parent c48ac6d commit 910a506

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/repos
33
/rush-dev.ini
44
/tmp
5+
.aider*

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ services:
22
bash:
33
build: .
44
<<: &default
5-
image: dannyben/rush
5+
image: dannyben/rush-local
66
environment:
77
LC_ALL: en_US.UTF-8 # consistent sort order
88
volumes:

setup

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,18 @@ section() {
1919
printf "\n=== %s\n" "$(green_bold "$@")"
2020
}
2121

22-
copy() {
23-
printf "%s => %s\n" "$(blue "$(printf '%-25s' "$1")")" "$2"
24-
cp "$1" "$2"
25-
}
26-
2722
sudo_copy() {
2823
printf "%s => %s\n" "$(blue "$(printf '%-25s' "$1")")" "$2"
29-
$sudo cp "$1" "$2"
24+
25+
if [[ -n "$3" ]]; then
26+
$sudo install -m "$3" "$1" "$2"
27+
else
28+
$sudo install "$1" "$2"
29+
fi
3030
}
3131

3232
copy_executable() {
33-
sudo_copy "$1" "/usr/local/bin/"
34-
$sudo chmod a+x "/usr/local/bin/$1"
33+
sudo_copy "$1" "/usr/local/bin/" "755"
3534
}
3635

3736
copy_man() {

0 commit comments

Comments
 (0)