It must run before applying all patches so an extra script will not work so good. It applies all patches using quilt and automatically refreshes then. Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx> --- scripts/admin-refresh.sh | 4 ++-- scripts/admin-update.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/scripts/admin-refresh.sh b/scripts/admin-refresh.sh index 743ecd4..5848b1e 100755 --- a/scripts/admin-refresh.sh +++ b/scripts/admin-refresh.sh @@ -1,3 +1,3 @@ #!/bin/bash -./scripts/admin-clean.sh -./scripts/admin-update.sh +./scripts/admin-clean.sh $@ +./scripts/admin-update.sh $@ diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh index d029451..7c63202 100755 --- a/scripts/admin-update.sh +++ b/scripts/admin-update.sh @@ -237,6 +237,40 @@ cp $GIT_COMPAT_TREE/compat/Makefile $COMPAT/ cp $GIT_COMPAT_TREE/include/linux/*.h include/linux/ rm -f $COMPAT/*.mod.c +# Refresh patches using quilt +patchRefresh() { + if [ -d patches.orig ] ; then + rm -rf .pc patches/series + else + mkdir patches.orig + fi + + mv -u patches/* patches.orig/ + + for i in patches.orig/*.patch; do + echo -e "${GREEN}Refresh backport patch${NORMAL}: ${BLUE}$i${NORMAL}" + quilt import $i + quilt push -f + RET=$? + if [[ $RET -ne 0 ]]; then + echo -e "${RED}Refreshing $i failed${NORMAL}, update it" + echo -e "use ${CYAN}quilt edit [filename]${NORMAL} to apply the failed part manually" + echo -e "use ${CYAN}quilt refresh${NORMAL} after the files are corrected and rerun this script" + cp patches.orig/README patches/README + exit $RET + fi + QUILT_DIFF_OPTS="-p" quilt refresh -p ab --no-index --no-timestamp + done + quilt pop -a + + cp patches.orig/README patches/README + rm -rf patches.orig .pc patches/series +} + +if [[ "$1" = "refresh" ]]; then + patchRefresh +fi + for i in patches/*.patch; do echo -e "${GREEN}Applying backport patch${NORMAL}: ${BLUE}$i${NORMAL}" patch -p1 -N -t < $i -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html