improved Helper, Create-Binary and hdw-get script
[hdw-linux/hdw-linux.git] / scripts / Create-Binary
index 14f9d45..2272327 100755 (executable)
@@ -59,12 +59,8 @@ else
                echo "creating binary tarball of $package"
                mkdir -p $hdw_home_dir/binaries/$bin_dir/$package &&
                cd $hdw_build_dir &&
-               # which files do we need? - are we packaging linux?
-               if [ "$package" = "linux" ] ; then
-                       fl_file="var/adm/flists/$package*"
-               else
-                       fl_file="var/adm/flists/$package"
-               fi
+               # which files do we need?
+               fl_file="var/adm/flists/$package"
                cat $fl_file | awk '{ print $2 }' | \
                tar --no-recursion --use-compress-program=bzip2 \
                -cf $hdw_home_dir/binaries/$bin_dir/$package/$tar_name.tar.bz2 \
@@ -78,14 +74,16 @@ fi
 
 elif [ "$package" = "all" ] ; then
 
-((counter=1))
-for pkg in `ls -A $hdw_build_dir/var/adm/flists | grep -v '.stage1'`; do
-       ./scripts/Create-Binary -package $pkg -root $hdw_build_dir
+((counter=0))
+for pkg in `ls -A $hdw_build_dir/var/adm/flists | grep -v '.stage'`; do
+       tar_name=`echo $pkg | awk -F- '{ print $1 }'`
+       ./scripts/Create-Binary -package $pkg -root $hdw_build_dir \
+                               -tar_name $tar_name
        ((counter+=1))
 done
 
 # add 00-dirtree, build in stage1
-./scripts/Create-Binary -package 00-dirtree.stage1 -tar-name 00-dirtree
+./scripts/Create-Binary -package 00-dirtree.stage0-0 -tar-name 00-dirtree
 ((counter+=1))
 
 echo "created $counter binaries, done"