]> wagnertech.de Git - projects.git/blobdiff - tools/make/configure
gnublin
[projects.git] / tools / make / configure
index 0771d5145e17bda5429a1603385f7f65943ff322..f4541ba64201b91988572132690795f8785a06e0 100755 (executable)
@@ -23,6 +23,19 @@ build=$2
 ARCH=""
 cpp_build=0
 
+shift 2
+while getopts "b:a:" opt
+do
+       case $opt in
+       a) ARCH=$OPTARG
+               ;;
+       b) echo "branching not implemented"
+               ;;
+       *) exit 1
+               ;;
+       esac
+done
+
 # checkout build utilities
 if [ ! -d projects ]; then
        git clone https://github.com/wagner-tech/projects/
@@ -35,13 +48,18 @@ then
        echo "file $paket.co missing or not executable."
        exit 1
 fi
-if [ ! -x $paket.cp ]
+
+# clean dirs and check out
+if [ -d src ]
 then
-       echo "warning: file $paket.cp missing or not executable:"
-       echo "  this file is necessary for any package production."
+       echo "Shall I delete src dir? [y]/n"
+       read key
+       if [ "$key" != "n" ]
+       then
+               rm -rf src
+       fi
 fi
 
-# clean dirs and check out
 if [ -e $paket ]
 then
        rm -rf $paket
@@ -79,6 +97,15 @@ else
        version=$(grep Version $paket.control |sed "s/Version: //")
 fi
 
+# check for copy file
+copy=$(find src -name $paket.cp)
+if [ -n "$copy" ]
+then
+       ln -sf $copy .
+else
+       echo "warning: file $paket.cp missing or not executable:"
+       echo "  this file is necessary for any package production."
+fi
 
 # check for postinst
 postinst=$(find src -name $paket.postinst)