]> www.hackdaworld.org Git - hdw-linux/hdw-linux.git/blob - scripts/Helper
CHANGELOG 2004-07-26
[hdw-linux/hdw-linux.git] / scripts / Helper
1 #!/bin/sh
2 #
3 # hdw - linux ./scripts/Helper script
4 #
5 # author: hackbard@hackdaworld.dyndns.org
6 #
7
8 # reading Config file
9 . ./Config
10 . ./scripts/subroutines
11
12 # soon there will be some usefull options available:
13 # - create new priorities according to dependencies
14
15 ccl=0
16 cdf=0
17
18 while [ "$1" ] ; do
19         case "$1" in
20                 -create_cvs_list)       ccl=1;  shift 1 ;;
21                 -create_dist_files)     cdf=1;  shift 1 ;;
22                 *)
23                         echo
24                         echo "usage:"
25                         echo
26                         echo "$0 -create_cvs_list"
27                         echo "$0 -create_dist_files"
28                         echo
29                         exit 1 ;;
30         esac
31 done
32
33
34 if [ "$ccl" = "1" ] ; then
35         echo -en "puzzling PKGS files ..."
36         ./scripts/Puzzle > /dev/null 2>&1
37         echo -en " done.\n"
38         for i in download/*/PKGS; do
39                 grep 'cvs:' $i | \
40                         while read pkg package foo; do
41                                 cat=`echo $i | awk -F/ '{ print $2 }'`
42                                 echo "download/$cat/$pkg/$package"
43                         done
44         done
45 fi
46
47 if [ "$cdf" = "1" ] ; then
48         max=`grep '^max=' ./scripts/Build-Distro | awk -F= '{ print $2 }'`
49         mkdir -p ./distro
50         . ./Config
51         echo -en "creating dist file ./distro/$hdw_target ..."
52         . ./scripts/subroutines
53         echo "00-dirtree" > ./distro/$hdw_target
54         create_buildorder '2 3 4' $max > ./distro/$hdw_target.~
55         grep -v '^#' ./distro/$hdw_target.~ | awk '{ print $4 }' >> \
56                 ./distro/$hdw_target
57         rm ./distro/$hdw_target.~
58         echo -en " done\n"
59 fi
60