2016-04-02 11:55:54 +08:00
|
|
|
#!/usr/bin/env bash
|
2016-01-26 14:04:43 +08:00
|
|
|
|
2016-04-03 15:23:19 +08:00
|
|
|
(
|
|
|
|
set -e
|
2016-01-26 14:04:43 +08:00
|
|
|
PS1="$"
|
2016-04-03 16:35:51 +08:00
|
|
|
basedir="$(cd "$1" && pwd -P)"
|
2016-04-02 11:55:54 +08:00
|
|
|
workdir="$basedir/work"
|
2018-05-25 02:41:50 +08:00
|
|
|
gitcmd="git -c commit.gpgsign=false"
|
2016-01-26 14:04:43 +08:00
|
|
|
|
|
|
|
function update {
|
2016-04-02 11:55:54 +08:00
|
|
|
cd "$workdir/$1"
|
2018-05-25 02:41:50 +08:00
|
|
|
$gitcmd fetch && $gitcmd reset --hard origin/master
|
2016-01-26 14:04:43 +08:00
|
|
|
cd ../
|
2018-05-25 02:41:50 +08:00
|
|
|
$gitcmd add $1
|
2016-01-26 14:04:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
update Bukkit
|
|
|
|
update CraftBukkit
|
2016-03-22 01:32:05 +08:00
|
|
|
update Spigot
|
2016-08-20 05:00:59 +08:00
|
|
|
|
2017-05-21 12:41:39 +08:00
|
|
|
if [[ "$2" = "all" || "$2" = "a" ]] ; then
|
2016-08-20 05:00:59 +08:00
|
|
|
update BuildData
|
|
|
|
update Paperclip
|
|
|
|
fi
|
2016-04-03 15:23:19 +08:00
|
|
|
)
|