-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: modify fish and zsh configuration as well (#93)
- Loading branch information
Showing
1 changed file
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,12 +60,31 @@ fi | |
mkdir -p "$INSTALL_DIR" | ||
tar -xzf "$TEMP_FILE" -C "$INSTALL_DIR" | ||
|
||
# Make it executable and add it to the path. | ||
# bash: add line to config such that pixi is in the path | ||
LINE="export PATH=\$PATH:${INSTALL_DIR}" | ||
if ! grep -Fxq "$LINE" ~/.bash_profile | ||
then | ||
echo "$LINE" >> ~/.bash_profile | ||
fi | ||
|
||
# fish: if config.fish exists, add pixi to the path | ||
if [[ -f ~/.config/fish/config.fish ]]; then | ||
LINE="fish_add_path ${INSTALL_DIR}" | ||
if ! grep -Fxq "$LINE" ~/.config/fish/config.fishfi | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
YYYasin19
Author
Contributor
|
||
then | ||
echo "$LINE" >> ~/.config/fish/config.fish | ||
fi | ||
fi | ||
|
||
# zsh: if zshrc exists, add pixi to the path | ||
if [[ -f ~/.zshrc ]]; then | ||
LINE="export PATH=\$PATH:${INSTALL_DIR}" | ||
if ! grep -Fxq "$LINE" ~/.zshrc | ||
then | ||
echo "$LINE" >> ~/.zshrc | ||
fi | ||
fi | ||
|
||
chmod +x "$INSTALL_DIR/pixi" | ||
|
||
echo "Please restart or source your shell." | ||
|
@YYYasin19 fishfi?