mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
bfa122ae6a
testserver - use printf instead of echo, as echo is apparently inconsistent across environments requireDeps - change message slightly, maybe more useful to people?
25 lines
439 B
Bash
Executable File
25 lines
439 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
gitcmd="git -c commit.gpgsign=false"
|
|
|
|
color() {
|
|
if [ $2 ]; then
|
|
printf "\e[$1;$2m"
|
|
else
|
|
printf "\e[$1m"
|
|
fi
|
|
}
|
|
colorend() {
|
|
printf "\e[m"
|
|
}
|
|
|
|
paperstash() {
|
|
STASHED=$($gitcmd stash 2>/dev/null|| return 0) # errors are ok
|
|
}
|
|
|
|
paperunstash() {
|
|
if [[ "$STASHED" != "No local changes to save" ]] ; then
|
|
$gitcmd stash pop 2>/dev/null|| return 0 # errors are ok
|
|
fi
|
|
}
|