Last active
March 13, 2020 19:35
-
-
Save reijovosu/8b031e583a35114e7627a60d834a63be to your computer and use it in GitHub Desktop.
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 | |
# Install Nano (www.nano-editor.org) with syntax highlighting (MacOS) | |
# sh -c "$(curl -fsSL https://gist.github.com/reijovosu/8b031e583a35114e7627a60d834a63be/raw/b36d2766d70972610cfda8d8c4356340ee2ee998/install-nano.sh)" | |
VERSION="4.8" | |
NANO_SHORT="nano-$VERSION" | |
NANO_SRC="$NANO_SHORT.tar.gz" | |
NANO_URL="https://www.nano-editor.org/dist/v4" | |
NANO_EXTRA="https://github.com/scopatz/nanorc" | |
cd ~/ | |
curl -Ok $NANO_URL/$NANO_SRC | |
tar -zxvf $NANO_SRC | |
mv $NANO_SHORT ~/.nano && cd ~/.nano/ | |
./configure && make && sudo make install | |
git clone --depth=1 $NANO_EXTRA syntax_improved | |
cd ~/ && touch .nanorc | |
cat > .nanorc <<EOF | |
include ~/.nano/syntax/*.nanorc | |
include ~/.nano/syntax_improved/*.nanorc | |
EOF | |
rm -vf $NANO_SRC | |
printf "\nExit terminal and reopen to start using $NANO_SHORT\nTo uninstall it and revert to old:\ncd ~/.nano && sudo make clean uninstall && rm -rf ~/.nano\n" | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment