Last active
November 4, 2024 14:48
-
-
Save stknohg/960d9108711d59ce6195ea8b3954fe72 to your computer and use it in GitHub Desktop.
Linux環境にNushellをインストールする手順
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
# Change default shell | |
echo '/usr/bin/nu' | sudo tee -a /etc/shells | |
chsh -s /usr/bin/nu |
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
#!/usr/bin/env bash | |
# Download and install | |
NU_VERSION=$(curl -s https://api.github.com/repos/nushell/nushell/releases/latest | grep tag_name | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g') | |
curl -LO https://github.com/nushell/nushell/releases/download/${NU_VERSION}/nu-${NU_VERSION}-x86_64-unknown-linux-gnu.tar.gz | |
sudo mkdir -p /opt/nushell/${NU_VERSION}/ | |
sudo tar xzvf nu-${NU_VERSION}-x86_64-unknown-linux-gnu.tar.gz -C /opt/nushell/${NU_VERSION}/ --strip-components 1 | |
rm -f ./nu-${NU_VERSION}-x86_64-unknown-linux-gnu.tar.gz | |
# Set symbolic link | |
sudo ln -sf /opt/nushell/${NU_VERSION}/nu /usr/bin/nu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment