Skip to content

Commit

Permalink
fix: Ensure francinette aliases exist if user uses their own rc files
Browse files Browse the repository at this point in the history
  • Loading branch information
itislu committed Feb 9, 2025
1 parent 62747c5 commit 0715700
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .devcontainer/entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,19 @@ for item_path in "$mount_dir"/*; do
done
shopt -u dotglob nullglob

# Set up francinette aliases
rc_files=( "$HOME/.bashrc" "$HOME/.config/fish/config.fish" "$HOME/.zshrc" )
for rc_file in "${rc_files[@]}"; do
mkdir -p "$(dirname "$rc_file")"
if ! grep "francinette=" "$rc_file" &> /dev/null; then
printf "\nalias francinette=%s/francinette/tester.sh\n" "$HOME" >> "$rc_file"
fi
if ! grep "paco=" "$rc_file" &> /dev/null; then
printf "\nalias paco=%s/francinette/tester.sh\n" "$HOME" >> "$rc_file"
fi
first_level=${rc_file#"$HOME/"}
first_level=${first_level%%/*}
chown -R "$USER:$USER" "$HOME/$first_level"
done

exec "$@"

0 comments on commit 0715700

Please sign in to comment.