Update and move scripts

This commit is contained in:
KMY 2023-09-17 20:13:01 +09:00
parent 8b6e65d6fe
commit 7744b2a1ce
4 changed files with 10 additions and 9 deletions

View file

@ -1,3 +1,5 @@
VERSION=5.0
apt update && apt upgrade -y
apt install -y curl wget gnupg apt-transport-https lsb-release ca-certificates
@ -33,10 +35,15 @@ sudo -u postgres psql << EOF
EOF
# kmyblueソースコードをダウンロード
# 続きのシェルスクリプトをgit管理外にコピーし権限を与える
su - mastodon <<EOF
git clone https://github.com/kmycode/mastodon.git live
cp /home/mastodon/live/install/setup2.sh /home/mastodon/setup2.sh
cp /home/mastodon/live/install/$VERSION/setup2.sh /home/mastodon/setup2.sh
cp /home/mastodon/live/install/$VERSION/setup3.sh /home/mastodon/setup3.sh
cp /home/mastodon/live/install/$VERSION/setup4.sh /home/mastodon/setup4.sh
chmod +x /home/mastodon/setup2.sh
chmod +x /home/mastodon/setup3.sh
chmod +x /home/mastodon/setup4.sh
EOF
# ---------------------------------------------------

View file

@ -1,11 +1,11 @@
# gitで最新リリースを取得
cd ~/live
# 最新タグを取り込む
# kmyblueの最新タグを取り込む
if [ "$1" == "debug" ]; then
elif [ "$1" == "newest" ]; then
git checkout $(git tag -l | grep -E '^kb[0-9]' | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
else
# LTS
git checkout $(git tag -l | grep -E '^kb[0-9].*lts$' | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
fi
@ -15,12 +15,6 @@ 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
chmod +x /home/mastodon/setup4.sh
# ---------------------------------------------------
cat << EOF