Commented out smart -p0 handling in dev-support/smart-apply-patch.sh until we fix our jenkins env
This commit is contained in:
parent
7487278baf
commit
aa71a8b9b9
|
@ -46,32 +46,36 @@ if $PATCH -p0 -E --dry-run < $PATCH_FILE 2>&1 > $TMP; then
|
||||||
# is adding new files and they would apply anywhere. So try to guess the
|
# is adding new files and they would apply anywhere. So try to guess the
|
||||||
# correct place to put those files.
|
# correct place to put those files.
|
||||||
|
|
||||||
TMP2=/tmp/tmp.paths.2.$$
|
# NOTE 2014/07/17:
|
||||||
TOCLEAN="$TOCLEAN $TMP2"
|
# Temporarily disabling below check since our jenkins boxes seems to be not defaulting to bash
|
||||||
|
# causing below checks to fail. Once it is fixed, we can revert the commit and enable this again.
|
||||||
|
|
||||||
grep '^patching file ' $TMP | awk '{print $3}' | grep -v /dev/null | sort | uniq > $TMP2
|
# TMP2=/tmp/tmp.paths.2.$$
|
||||||
|
# TOCLEAN="$TOCLEAN $TMP2"
|
||||||
#first off check that all of the files do not exist
|
#
|
||||||
FOUND_ANY=0
|
# grep '^patching file ' $TMP | awk '{print $3}' | grep -v /dev/null | sort | uniq > $TMP2
|
||||||
for CHECK_FILE in $(cat $TMP2)
|
#
|
||||||
do
|
# #first off check that all of the files do not exist
|
||||||
if [[ -f $CHECK_FILE ]]; then
|
# FOUND_ANY=0
|
||||||
FOUND_ANY=1
|
# for CHECK_FILE in $(cat $TMP2)
|
||||||
fi
|
# do
|
||||||
done
|
# if [[ -f $CHECK_FILE ]]; then
|
||||||
|
# FOUND_ANY=1
|
||||||
if [[ "$FOUND_ANY" = "0" ]]; then
|
# fi
|
||||||
#all of the files are new files so we have to guess where the correct place to put it is.
|
# done
|
||||||
|
#
|
||||||
# if all of the lines start with a/ or b/, then this is a git patch that
|
# if [[ "$FOUND_ANY" = "0" ]]; then
|
||||||
# was generated without --no-prefix
|
# #all of the files are new files so we have to guess where the correct place to put it is.
|
||||||
if ! grep -qv '^a/\|^b/' $TMP2 ; then
|
#
|
||||||
echo Looks like this is a git patch. Stripping a/ and b/ prefixes
|
# # if all of the lines start with a/ or b/, then this is a git patch that
|
||||||
echo and incrementing PLEVEL
|
# # was generated without --no-prefix
|
||||||
PLEVEL=$[$PLEVEL + 1]
|
# if ! grep -qv '^a/\|^b/' $TMP2 ; then
|
||||||
sed -i -e 's,^[ab]/,,' $TMP2
|
# echo Looks like this is a git patch. Stripping a/ and b/ prefixes
|
||||||
fi
|
# echo and incrementing PLEVEL
|
||||||
fi
|
# PLEVEL=$[$PLEVEL + 1]
|
||||||
|
# sed -i -e 's,^[ab]/,,' $TMP2
|
||||||
|
# fi
|
||||||
|
# fi
|
||||||
elif $PATCH -p1 -E --dry-run < $PATCH_FILE 2>&1 > /dev/null; then
|
elif $PATCH -p1 -E --dry-run < $PATCH_FILE 2>&1 > /dev/null; then
|
||||||
PLEVEL=1
|
PLEVEL=1
|
||||||
elif $PATCH -p2 -E --dry-run < $PATCH_FILE 2>&1 > /dev/null; then
|
elif $PATCH -p2 -E --dry-run < $PATCH_FILE 2>&1 > /dev/null; then
|
||||||
|
|
Loading…
Reference in New Issue