wget -qO- https://gist.githubusercontent.com/AmaseCocoa/c3dffb747c600e257d04c942a92e167e/raw/install.sh | bash
Last active
July 28, 2024 12:30
-
-
Save AmaseCocoa/c3dffb747c600e257d04c942a92e167e to your computer and use it in GitHub Desktop.
レンタルサーバーにGNU nanoをインストールするためのシェルスクリプト (バグがある可能性大)
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
#!/bin/bash | |
wget https://ftp.gnu.org/gnu/ncurses/ncurses-6.3.tar.gz | |
tar zxvf ncurses-6.3.tar.gz | |
cd ncurses-6.3/ | |
./configure --prefix=${HOME}/local | |
make | |
make install | |
cd .. | |
rm -rf ncurses-6.3 | |
rm ncurses-6.3.tar.gz | |
export CFLAGS="-I$HOME/local/include $CFLAGS" | |
export LDFLAGS="-L$HOME/local/lib $LDFLAGS" | |
wget https://www.nano-editor.org/dist/latest/nano-8.0.tar.gz | |
tar zxf nano-8.0.tar.gz | |
cd nano-8.0 | |
./configure --prefix=$HOME/local --enable-nanorc | |
read -p "上記のパスをメモした後、enterキーを押してください..." | |
make | |
make install | |
cd .. | |
rm -rf nano-8.0 | |
rm nano-8.0.tar.gz | |
BASHRC="$HOME/.bashrc" | |
EXPORT_CMD="export PATH=\$HOME/local/bin:\$PATH" | |
grep -qxF "$EXPORT_CMD" "$BASHRC" | |
if [ $? -ne 0 ]; then | |
echo "$EXPORT_CMD" >> "$BASHRC" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment