BUILDTOOLS-301: Make shell scripts POSIX correct

This commit is contained in:
md_5 2017-01-30 08:34:39 +11:00
parent 6de2fbc337
commit e2243e9cfc
3 changed files with 5 additions and 19 deletions

View file

@ -1,10 +1,10 @@
#!/bin/bash
#!/bin/sh
PS1="$"
basedir=`pwd`
echo "Rebuilding Forked projects.... "
function applyPatch {
applyPatch() {
what=$1
target=$2
branch=$3

View file

@ -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"

View file

@ -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