mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-18 18:08:07 +03:00
Better zsh install fix (#14017)
Fix it on linux too 🤦
Release Notes:
- N/A
This commit is contained in:
parent
110ce8a267
commit
0d527dfb9e
@ -44,6 +44,26 @@ main() {
|
||||
fi
|
||||
|
||||
"$platform" "$@"
|
||||
|
||||
if [ "$(which "zed")" = "$HOME/.local/bin/zed" ]; then
|
||||
echo "Zed has been installed. Run with 'zed'"
|
||||
else
|
||||
echo "To run Zed from your terminal, you must add ~/.local/bin to your PATH"
|
||||
echo "Run:"
|
||||
|
||||
case "$SHELL" in
|
||||
*zsh)
|
||||
echo " echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.zshrc"
|
||||
echo " source ~/.zshrc"
|
||||
;;
|
||||
*)
|
||||
echo " echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.bashrc"
|
||||
echo " source ~/.bashrc"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "To run Zed now, '~/.local/bin/zed'"
|
||||
fi
|
||||
}
|
||||
|
||||
linux() {
|
||||
@ -100,16 +120,6 @@ linux() {
|
||||
cp "$HOME/.local/zed$suffix.app/share/applications/zed$suffix.desktop" "${desktop_file_path}"
|
||||
sed -i "s|Icon=zed|Icon=$HOME/.local/zed$suffix.app/share/icons/hicolor/512x512/apps/zed.png|g" "${desktop_file_path}"
|
||||
sed -i "s|Exec=zed|Exec=$HOME/.local/zed$suffix.app/libexec/zed-editor|g" "${desktop_file_path}"
|
||||
|
||||
if which "zed" >/dev/null 2>&1; then
|
||||
echo "Zed has been installed. Run with 'zed'"
|
||||
else
|
||||
echo "To run Zed from your terminal, you must add ~/.local/bin to your PATH"
|
||||
echo "Run:"
|
||||
echo " echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.bashrc"
|
||||
echo " source ~/.bashrc"
|
||||
echo "To run Zed now, '~/.local/bin/zed'"
|
||||
fi
|
||||
}
|
||||
|
||||
macos() {
|
||||
@ -128,26 +138,6 @@ macos() {
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
# Link the binary
|
||||
ln -sf "/Applications/$app/Contents/MacOS/cli" "$HOME/.local/bin/zed"
|
||||
|
||||
if [ "$(which "zed")" = "$HOME/.local/bin/zed" ]; then
|
||||
echo "Zed has been installed. Run with 'zed'"
|
||||
else
|
||||
echo "To run Zed from your terminal, you must add ~/.local/bin to your PATH"
|
||||
echo "Run:"
|
||||
|
||||
case "$SHELL" in
|
||||
*zsh)
|
||||
echo " echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.zshrc"
|
||||
echo " source ~/.zshrc"
|
||||
;;
|
||||
*)
|
||||
echo " echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.bashrc"
|
||||
echo " source ~/.bashrc"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "To run Zed now, '~/.local/bin/zed'"
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user