Update .local/bin/provision
This commit is contained in:
parent
d72760ccf5
commit
1b1d5ebbed
1 changed files with 11 additions and 5 deletions
|
@ -177,17 +177,23 @@ fi
|
||||||
### Copy folders
|
### Copy folders
|
||||||
find /usr/local/src/hiawatha -maxdepth 1 -mindepth 1 -type d | while read FOLDER; do
|
find /usr/local/src/hiawatha -maxdepth 1 -mindepth 1 -type d | while read FOLDER; do
|
||||||
BASENAME="$(basename "$FOLDER")"
|
BASENAME="$(basename "$FOLDER")"
|
||||||
if [ ! -d "$HOME/$BASENAME" ]; then
|
# Prevent initial-scaffolding of OS-specific files since Chezmoi will handle them
|
||||||
mkdir -p "$HOME/$BASENAME"
|
if [[ "$BASENAME" != 'AppData' ]] && [[ "$BASENAME" != 'Library' ]]; then
|
||||||
|
if [ ! -d "$HOME/$BASENAME" ]; then
|
||||||
|
mkdir -p "$HOME/$BASENAME"
|
||||||
|
fi
|
||||||
|
cp -rf "$FOLDER/"* "$HOME/$BASENAME"
|
||||||
fi
|
fi
|
||||||
cp -rf "$FOLDER/"* "$HOME/$BASENAME"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
### Copy files
|
### Copy files
|
||||||
find /usr/local/src/hiawatha -maxdepth 1 -mindepth 1 -type f | while read FILE; do
|
find /usr/local/src/hiawatha -maxdepth 1 -mindepth 1 -type f | while read FILE; do
|
||||||
BASENAME="$(basename "$FILE")"
|
BASENAME="$(basename "$FILE")"
|
||||||
cp "$FILE" "$HOME/$BASENAME"
|
# Prevent repository-specific files from being copied over to user's HOME
|
||||||
chmod 600 "$HOME/$BASENAME"
|
if [[ "$BASENAME" != *'.md' ]] && [[ "$BASENAME" != *'.sh' ]] && [ "$BASENAME" != 'logo.png' ] && [ "$BASENAME" != '.gitlab-ci.yml' ]; then
|
||||||
|
cp "$FILE" "$HOME/$BASENAME"
|
||||||
|
chmod 600 "$HOME/$BASENAME"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
### Ensure ~/.local/bin files are executable
|
### Ensure ~/.local/bin files are executable
|
||||||
|
|
Loading…
Reference in a new issue