Update and move scripts
This commit is contained in:
parent
8b6e65d6fe
commit
7744b2a1ce
4 changed files with 10 additions and 9 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
VERSION=5.0
|
||||||
|
|
||||||
apt update && apt upgrade -y
|
apt update && apt upgrade -y
|
||||||
|
|
||||||
apt install -y curl wget gnupg apt-transport-https lsb-release ca-certificates
|
apt install -y curl wget gnupg apt-transport-https lsb-release ca-certificates
|
||||||
|
@ -33,10 +35,15 @@ sudo -u postgres psql << EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# kmyblueソースコードをダウンロード
|
# kmyblueソースコードをダウンロード
|
||||||
|
# 続きのシェルスクリプトをgit管理外にコピーし権限を与える
|
||||||
su - mastodon <<EOF
|
su - mastodon <<EOF
|
||||||
git clone https://github.com/kmycode/mastodon.git live
|
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/setup2.sh
|
||||||
|
chmod +x /home/mastodon/setup3.sh
|
||||||
|
chmod +x /home/mastodon/setup4.sh
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# ---------------------------------------------------
|
# ---------------------------------------------------
|
|
@ -1,11 +1,11 @@
|
||||||
# gitで最新リリースを取得
|
|
||||||
cd ~/live
|
cd ~/live
|
||||||
|
|
||||||
# 最新タグを取り込む
|
# kmyblueの最新タグを取り込む
|
||||||
if [ "$1" == "debug" ]; then
|
if [ "$1" == "debug" ]; then
|
||||||
elif [ "$1" == "newest" ]; 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)
|
git checkout $(git tag -l | grep -E '^kb[0-9]' | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
|
||||||
else
|
else
|
||||||
|
# LTS
|
||||||
git checkout $(git tag -l | grep -E '^kb[0-9].*lts$' | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
|
git checkout $(git tag -l | grep -E '^kb[0-9].*lts$' | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -15,12 +15,6 @@ cd ~/.rbenv && src/configure && make -C src
|
||||||
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
|
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
|
||||||
echo 'eval "$(rbenv init -)"' >> ~/.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
|
cat << EOF
|
Loading…
Add table
Add a link
Reference in a new issue