added a delete feature to the xorg package generator script
authorJohn Crispin <john@openwrt.org>
Mon, 24 Sep 2007 17:39:03 +0000 (17:39 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 24 Sep 2007 17:39:03 +0000 (17:39 +0000)
SVN-Revision: 9010

XOrg/generate.sh

index 92d0ab0..f3d9da1 100755 (executable)
@@ -11,11 +11,13 @@ for d in `find . -name packages`; do
                DEP=`echo ${p##*|} | sed "s/+/ +/g"`
                echo generating Makefile for ${NAME}-${VER} with deps : ${DEP}
                rm -rf ${NAME} 
-               mkdir ${NAME}
-               sed "s/@VER@/${VER}/g" template.mk | sed "s/@DEP@/${DEP}/g" | sed "s/@NAME@/${NAME}/g" | sed "s/@BASE_NAME@/${BASE_NAME}/g" > ${NAME}/Makefile
-               if [ -d `pwd`/patches/${NAME} ]; then
-                       mkdir ${NAME}/patches
-                       cp -r `pwd`/patches/${NAME}/* ${NAME}/patches/
+               if [ "$1" == "gen" ]; then
+                       mkdir ${NAME}
+                       sed "s/@VER@/${VER}/g" template.mk | sed "s/@DEP@/${DEP}/g" | sed "s/@NAME@/${NAME}/g" | sed "s/@BASE_NAME@/${BASE_NAME}/g" > ${NAME}/Makefile
+                       if [ -d `pwd`/patches/${NAME} ]; then
+                               mkdir ${NAME}/patches
+                               cp -r `pwd`/patches/${NAME}/* ${NAME}/patches/
+                       fi
                fi
        done
        cd - > /dev/null