Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
d45565f83b
Instead of checking whether it was set previously, setting it to false, then setting it back to true if it was true before, just use the command-line argument in git to override the config for that command. Using a variable makes it pretty painless to do.
26 Zeilen
391 B
Bash
Ausführbare Datei
26 Zeilen
391 B
Bash
Ausführbare Datei
#!/usr/bin/env bash
|
|
|
|
(
|
|
set -e
|
|
PS1="$"
|
|
basedir="$(cd "$1" && pwd -P)"
|
|
workdir="$basedir/work"
|
|
gitcmd="git -c commit.gpgsign=false"
|
|
|
|
function update {
|
|
cd "$workdir/$1"
|
|
$gitcmd fetch && $gitcmd reset --hard origin/master
|
|
cd ../
|
|
$gitcmd add $1
|
|
}
|
|
|
|
update Bukkit
|
|
update CraftBukkit
|
|
update Spigot
|
|
|
|
if [[ "$2" = "all" || "$2" = "a" ]] ; then
|
|
update BuildData
|
|
update Paperclip
|
|
fi
|
|
)
|