/[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 104 - (hide annotations)
Mon Sep 6 14:09:54 2010 UTC (11 years, 1 month ago) by sng
File size: 2264 byte(s)
fixing scripts...
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 97 # clean output folder
19     rm -rf /root/tmp/clonezilla-sysresccd/clonezilla*.iso 2>/dev/null
20     for n in 0 1 2;do
21     create-clonezilla-sysresccd -a -p "$n"
22     done
23    
24    
25     clear
26    
27    
28     unset VERSION
29     for ISO in `find /root/tmp/ -name "clonezilla-sysresccd*.iso"`;do
30     FILE=`basename ${ISO}`
31     ISO_DIR=`echo "$FILE" | sed 's|.iso$||'`
32     if [ -z "$VERSION" ];then
33     VERSION=`echo "$ISO_DIR" | sed 's|.*-\([0-9]\.[0-9]\.[0-9]\)$|\1|'`
34     echo -n "Creating folder "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" "
35     mkdir "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" 2>/dev/null
36     if [ ! -d "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" ];then
37     echo
38     echo "Error creating folder:"
39     echo " "$OUT_DIR"/clonezilla-sysresccd-"$VERSION""
40     exit 1
41     fi
42     echo "done"
43     fi
44     echo -n "Creating folder "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR" "
45     mkdir "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR" 2>/dev/null
46     if [ ! -d "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" ];then
47     echo
48     echo "Error creating folder:"
49     echo " "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR""
50     exit 1
51     fi
52     echo "done"
53     echo -n " Moving files "
54     rm "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR"/md5sum* 2>/dev/null
55     cp ${ISO} "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR" || {
56     echo
57     echo "Error copying file:"
58     echo " ${ISO}"
59     exit 1
60     } && {
61     echo "done"
62     echo -n " Calculating MD5SUM "
63     rm ${ISO} 2>/dev/null
64     cd "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR"
65     md5sum "$FILE" > md5sum.txt
66     echo "done"
67     }
68    
69     done
70 sng 99
71     # create tgz file
72 sng 104 echo "
73     Creating TARBALL...
74     "
75 sng 99 cd "$TGZ_DIR"
76     make dist || {
77     echo "Error on make dist..."
78     exit 1
79     } && {
80     rm "$OUT_DIR"/*z 2>/dev/null
81     cp "$TGZ_DIR"/create-clonezilla-sysresccd-"$VERSION".tar.gz "$OUT_DIR"
82     }

Properties

Name Value
svn:executable *

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26