Update setup script

This commit is contained in:
KMY 2023-09-17 12:12:48 +09:00
parent 39a2e1a1f6
commit 6238e80b08
2 changed files with 10 additions and 2 deletions

View file

@ -1,12 +1,18 @@
# gitで最新リリースを取得
cd ~/live
git checkout $(git tag -l | grep -E '^kb[0-9]' | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
# 最新タグを取り込む
if [ "$1" != "newest" ]; then
git checkout $(git tag -l | grep -E '^kb[0-9]' | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
fi
# Rubyバージョン管理用のrbenvをインストール、初期設定
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
# 続きのシェルスクリプトをgit管理外にコピーし権限を与える
cp /home/mastodon/live/install/setup3.sh /home/mastodon/setup3.sh
chmod +x /home/mastodon/setup3.sh
cp /home/mastodon/live/install/setup4.sh /home/mastodon/setup4.sh