improved Helper, Create-Binary and hdw-get script
[hdw-linux/hdw-linux.git] / scripts / Helper
index d2c8ea1..90d9bdf 100755 (executable)
 # - create new priorities according to dependencies
 
 ccl=0
+cdf=0
 
 while [ "$1" ] ; do
        case "$1" in
                -create_cvs_list)       ccl=1;  shift 1 ;;
+               -create_dist_files)     cdf=1;  shift 1 ;;
                *)
                        echo
                        echo "usage:"
                        echo
                        echo "$0 -create_cvs_list"
+                       echo "$0 -create_dist_files"
                        echo
                        exit 1 ;;
        esac
@@ -40,3 +43,18 @@ if [ "$ccl" = "1" ] ; then
                        done
        done
 fi
+
+if [ "$cdf" = "1" ] ; then
+       max=`grep '^max=' ./scripts/Build-Distro | awk -F= '{ print $2 }'`
+       mkdir -p ./distro
+       . ./Config
+       echo -en "creating dist file ./distro/$hdw_target ..."
+       . ./scripts/subroutines
+       echo "00-dirtree" > ./distro/$hdw_target
+       create_buildorder '2 3 4' $max > ./distro/$hdw_target.~
+       grep -v '^#' ./distro/$hdw_target.~ | awk '{ print $4 }' >> \
+               ./distro/$hdw_target
+       rm ./distro/$hdw_target.~
+       echo -en " done\n"
+fi
+