/[clonezilla-sysresccd]/trunk/www/working/scripts/create-iso-tree
ViewVC logotype

Annotation of /trunk/www/working/scripts/create-iso-tree

Parent Directory Parent Directory | Revision Log Revision Log


Revision 176 - (hide annotations)
Tue May 31 19:45:21 2011 UTC (10 years, 4 months ago) by sng
File size: 2544 byte(s)
- updating prerun scripts. Making them run once
- updating ocs-iso to 1.2.8-46
- minor create-clonezilla-sysresccd update

1 sng 97 #!/bin/bash
2     if [ `whoami` != "root" ];then
3     echo "You must be root to execute this script!!!"
4     exit 1
5     fi
6    
7    
8     OUT_DIR="$1"
9     if [ -z "$OUT_DIR" ];then
10     OUT_DIR=/e
11     fi
12    
13 sng 99 TGZ_DIR="$2"
14     if [ -z "$TGZ_DIR" ];then
15     TGZ_DIR=/home/spiros/clonezilla-sysresccd/trunk/create-clonezilla-sysresccd
16     fi
17    
18 sng 110
19     unset VERSION
20     VERSION=`sed '2!d' ../release-data`
21    
22    
23 sng 97 # clean output folder
24     rm -rf /root/tmp/clonezilla-sysresccd/clonezilla*.iso 2>/dev/null
25     for n in 0 1 2;do
26     create-clonezilla-sysresccd -a -p "$n"
27     done
28    
29    
30     clear
31    
32    
33     for ISO in `find /root/tmp/ -name "clonezilla-sysresccd*.iso"`;do
34     FILE=`basename ${ISO}`
35     ISO_DIR=`echo "$FILE" | sed 's|.iso$||'`
36     if [ -z "$VERSION" ];then
37     VERSION=`echo "$ISO_DIR" | sed 's|.*-\([0-9]\.[0-9]\.[0-9]\)$|\1|'`
38     echo -n "Creating folder "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" "
39 sng 141 mkdir -p "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" 2>/dev/null
40 sng 97 if [ ! -d "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" ];then
41     echo
42     echo "Error creating folder:"
43     echo " "$OUT_DIR"/clonezilla-sysresccd-"$VERSION""
44     exit 1
45     fi
46     echo "done"
47     fi
48     echo -n "Creating folder "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR" "
49 sng 141 mkdir -p "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR" 2>/dev/null
50 sng 97 if [ ! -d "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" ];then
51     echo
52     echo "Error creating folder:"
53     echo " "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR""
54     exit 1
55     fi
56     echo "done"
57     echo -n " Moving files "
58     rm "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR"/md5sum* 2>/dev/null
59     cp ${ISO} "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR" || {
60     echo
61     echo "Error copying file:"
62     echo " ${ISO}"
63     exit 1
64     } && {
65     echo "done"
66     echo -n " Calculating MD5SUM "
67     rm ${ISO} 2>/dev/null
68     cd "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR"
69     md5sum "$FILE" > md5sum.txt
70     echo "done"
71     }
72    
73     done
74 sng 99
75     # create tgz file
76 sng 104 echo "
77 sng 110
78    
79     VERSION=$VERSION
80    
81 sng 104 Creating TARBALL...
82     "
83 sng 99 cd "$TGZ_DIR"
84 sng 110 make clean
85 sng 99 make dist || {
86 sng 110 echo "
87    
88    
89     Error on make dist..."
90 sng 176 chown -R spiros:users *
91 sng 99 exit 1
92     } && {
93 sng 110 rm "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/*z 2>/dev/null
94     cp "$TGZ_DIR"/create-clonezilla-sysresccd-"$VERSION".tar.gz "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"
95 sng 174 chown -R spiros:users *
96 sng 176 chown -R spiros:users "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"
97 sng 99 }

Properties

Name Value
svn:executable *

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26