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
|
||||
find /usr/local/src/hiawatha -maxdepth 1 -mindepth 1 -type d | while read FOLDER; do
|
||||
BASENAME="$(basename "$FOLDER")"
|
||||
if [ ! -d "$HOME/$BASENAME" ]; then
|
||||
mkdir -p "$HOME/$BASENAME"
|
||||
# Prevent initial-scaffolding of OS-specific files since Chezmoi will handle them
|
||||
if [[ "$BASENAME" != 'AppData' ]] && [[ "$BASENAME" != 'Library' ]]; then
|
||||
if [ ! -d "$HOME/$BASENAME" ]; then
|
||||
mkdir -p "$HOME/$BASENAME"
|
||||
fi
|
||||
cp -rf "$FOLDER/"* "$HOME/$BASENAME"
|
||||
fi
|
||||
cp -rf "$FOLDER/"* "$HOME/$BASENAME"
|
||||
done
|
||||
|
||||
### Copy files
|
||||
find /usr/local/src/hiawatha -maxdepth 1 -mindepth 1 -type f | while read FILE; do
|
||||
BASENAME="$(basename "$FILE")"
|
||||
cp "$FILE" "$HOME/$BASENAME"
|
||||
chmod 600 "$HOME/$BASENAME"
|
||||
# Prevent repository-specific files from being copied over to user's HOME
|
||||
if [[ "$BASENAME" != *'.md' ]] && [[ "$BASENAME" != *'.sh' ]] && [ "$BASENAME" != 'logo.png' ] && [ "$BASENAME" != '.gitlab-ci.yml' ]; then
|
||||
cp "$FILE" "$HOME/$BASENAME"
|
||||
chmod 600 "$HOME/$BASENAME"
|
||||
fi
|
||||
done
|
||||
|
||||
### Ensure ~/.local/bin files are executable
|
||||
|
|
Loading…
Reference in a new issue