On 08/09/2012 08:01 PM, Ozan Çağlayan wrote: > Patches are now structured in network/ and drm/ subfolders. > Apply them only if the relevant subsystem is enabled. > > Signed-off-by: Ozan Çağlayan <ozancag@xxxxxxxxx> > --- > scripts/admin-update.sh | 49 +++++++++++++++++++++++++++++++------------------ > 1 file changed, 31 insertions(+), 18 deletions(-) > > diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh > index b5dbc4e..e701406 100755 > --- a/scripts/admin-update.sh > +++ b/scripts/admin-update.sh > @@ -143,7 +143,7 @@ nagometer() { > > let CHANGES=$ADD+$DEL > > - case $1 in > + case `dirname $1` in > "patches") > brag_backport $ORIG_CODE $CHANGES $ADD $DEL > ;; > @@ -201,6 +201,7 @@ copyDirectories() { > # These switches determines which drivers to fetch in. > ENABLE_NETWORK= > ENABLE_DRM= > +SUBSYSTEMS= > > EXTRA_PATCHES="patches" > REFRESH="n" > @@ -262,6 +263,15 @@ if [ $# -ge 1 ]; then > done > fi > > +# SUBSYSTEMS is used to select which patches to apply > +if [[ -n "$ENABLE_NETWORK" ]]; then > + SUBSYSTEMS="network" > +fi > + > +if [[ -n "$ENABLE_DRM" ]]; then > + SUBSYSTEMS+=" drm" > +fi > + > # User exported this variable > if [ -z $GIT_TREE ]; then > GIT_TREE="$HOME/linux-next" > @@ -604,25 +614,28 @@ for dir in $EXTRA_PATCHES; do > LAST_ELEM=$dir > done > > -for dir in $EXTRA_PATCHES; do > - if [[ ! -d $dir ]]; then > - echo -e "${RED}Patches: $dir empty, skipping...${NORMAL}\n" > - continue > - fi > - if [[ $LAST_ELEM = $dir && "$REFRESH" = y ]]; then > - patchRefresh $dir > - fi > - > - for i in $(ls -v $dir/*.patch &> /dev/null); do > - echo -e "${GREEN}Applying backport patch${NORMAL}: ${BLUE}$i${NORMAL}" > - patch -p1 -N -t < $i > - RET=$? > - if [[ $RET -ne 0 ]]; then > - echo -e "${RED}Patching $i failed${NORMAL}, update it" > - exit $RET > +for subsystem in $SUBSYSTEMS; do > + for dir in $EXTRA_PATCHES; do > + PATCHDIR="$dir/$subsystem" The folder network does not exists in this patch, this will break git bisect. Could you add the move of the patches from patches to network in this commit. I do not like the name network for the folder containing the patches, because it could easily be to mixed up with the net folder. What about patches-net as the folder name? > + if [[ ! -d $PATCHDIR ]]; then > + echo -e "${RED}Patches: $PATCHDIR empty, skipping...${NORMAL}\n" > + continue > + fi > + if [[ $LAST_ELEM = $dir && "$REFRESH" = y ]]; then > + patchRefresh $dir > fi > + > + for i in $(ls -v $PATCHDIR/*.patch 2> /dev/null); do > + echo -e "${GREEN}Applying backport patch${NORMAL}: ${BLUE}$i${NORMAL}" > + patch -p1 -N -t < $i > + RET=$? > + if [[ $RET -ne 0 ]]; then > + echo -e "${RED}Patching $i failed${NORMAL}, update it" > + exit $RET > + fi > + done > + nagometer $PATCHDIR $ORIG_CODE >> $CODE_METRICS > done > - nagometer $dir $ORIG_CODE >> $CODE_METRICS > done > > DIR="$PWD" > -- 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