mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-09-18 21:33:01 +00:00
BUILDTOOLS-301: Make shell scripts POSIX correct
This commit is contained in:
parent
6de2fbc337
commit
e2243e9cfc
3 changed files with 5 additions and 19 deletions
|
@ -1,10 +1,10 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
PS1="$"
|
||||
basedir=`pwd`
|
||||
echo "Rebuilding Forked projects.... "
|
||||
|
||||
function applyPatch {
|
||||
applyPatch() {
|
||||
what=$1
|
||||
target=$2
|
||||
branch=$3
|
||||
|
|
|
@ -4,7 +4,7 @@ PS1="$"
|
|||
basedir=`pwd`
|
||||
echo "Rebuilding patch files from current fork state..."
|
||||
|
||||
function cleanupPatches {
|
||||
cleanupPatches() {
|
||||
cd "$1"
|
||||
for patch in *.patch; do
|
||||
gitver=$(tail -n 2 $patch | grep -ve "^$" | tail -n 1)
|
||||
|
@ -14,7 +14,7 @@ function cleanupPatches {
|
|||
if [ "x$testver" != "x" ]; then
|
||||
diffs=$(echo "$diffs" | head -n -2)
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ "x$diffs" == "x" ] ; then
|
||||
git reset HEAD $patch >/dev/null
|
||||
|
@ -23,7 +23,7 @@ function cleanupPatches {
|
|||
done
|
||||
}
|
||||
|
||||
function savePatches {
|
||||
savePatches() {
|
||||
what=$1
|
||||
target=$2
|
||||
cd "$basedir/$target"
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
PS1="$"
|
||||
basedir=`pwd`
|
||||
|
||||
function update {
|
||||
cd "$basedir/$1"
|
||||
git fetch && git reset --hard origin/master
|
||||
cd ../
|
||||
git add $1
|
||||
}
|
||||
|
||||
update Bukkit
|
||||
update CraftBukkit
|
Loading…
Add table
Reference in a new issue