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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 97 - (show annotations)
Sun Aug 15 19:57:21 2010 UTC (11 years, 3 months ago) by sng
File size: 1903 byte(s)
- Cahnging links to table scheme in download.html
- Adding create-iso-tree to automate directory stracture
  creation for all three ISO files (and MD5 calculation)
- Adding create-iso-tree to vim session file

1 #!/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 # clean output folder
14 rm -rf /root/tmp/clonezilla-sysresccd/clonezilla*.iso 2>/dev/null
15 for n in 0 1 2;do
16 create-clonezilla-sysresccd -a -p "$n"
17 done
18
19
20 clear
21
22
23 unset VERSION
24 for ISO in `find /root/tmp/ -name "clonezilla-sysresccd*.iso"`;do
25 FILE=`basename ${ISO}`
26 ISO_DIR=`echo "$FILE" | sed 's|.iso$||'`
27 if [ -z "$VERSION" ];then
28 VERSION=`echo "$ISO_DIR" | sed 's|.*-\([0-9]\.[0-9]\.[0-9]\)$|\1|'`
29 echo -n "Creating folder "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" "
30 mkdir "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" 2>/dev/null
31 if [ ! -d "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" ];then
32 echo
33 echo "Error creating folder:"
34 echo " "$OUT_DIR"/clonezilla-sysresccd-"$VERSION""
35 exit 1
36 fi
37 echo "done"
38 fi
39 echo -n "Creating folder "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR" "
40 mkdir "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR" 2>/dev/null
41 if [ ! -d "$OUT_DIR"/clonezilla-sysresccd-"$VERSION" ];then
42 echo
43 echo "Error creating folder:"
44 echo " "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR""
45 exit 1
46 fi
47 echo "done"
48 echo -n " Moving files "
49 rm "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR"/md5sum* 2>/dev/null
50 cp ${ISO} "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR" || {
51 echo
52 echo "Error copying file:"
53 echo " ${ISO}"
54 exit 1
55 } && {
56 echo "done"
57 echo -n " Calculating MD5SUM "
58 rm ${ISO} 2>/dev/null
59 cd "$OUT_DIR"/clonezilla-sysresccd-"$VERSION"/"$ISO_DIR"
60 md5sum "$FILE" > md5sum.txt
61 echo "done"
62 }
63
64 done

Properties

Name Value
svn:executable *

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26