This commit was manufactured by cvs2svn to create tag
[opensuse:installation-images.git] / bin / ci_y2image_for_ppc
1 #! /bin/sh
2 set -x
3 # check in y2image to /work/src/done/SLES8-BETA/
4 # it creates the initrd, used in k_deflt etc.
5 # call from the installation-images directory
6
7 ver=`cat VERSION`
8 y2image_tmpdir=/tmp/y2image-$ver
9 work_done=/work/src/done/SLES8-BETA/y2image
10 work_SRC=/work/SRC/old-versions/8.1/BETA/arch/ppc/y2image
11
12 if [ "$ver" = "" ] ; then
13   echo "no version info?"
14   exit 1
15 fi
16
17 echo "going to check in y2image version $ver..."
18
19 make clean
20 [ -e $y2image_tmpdir ] && rm -rf $y2image_tmpdir
21 mkdir $y2image_tmpdir || exit 1
22 tar -cf - * | tar -C $y2image_tmpdir -xf -
23 cd $y2image_tmpdir
24 find . -depth -name CVS -exec rm -r {} \;
25 find . -depth -name .cvsignore -exec rm -r {} \;
26 rm -rf bin/ci_* MAINTAINER cache data/boot/linux.loopc
27 cd /tmp
28
29 tar -jcf $y2image_tmpdir.tar.bz2 y2image-$ver
30
31 if [ "$1" = test ] ; then
32   echo "y2image directory tree: $y2image_tmpdir"
33   exit
34 fi
35
36 if mkdir $work_done ; then
37   cd $work_done
38   cp $y2image_tmpdir.tar.bz2 ${work_SRC}/y2image.{changes,spec} .
39   [ -f ${work_SRC}/config-dist.sh ] && cp ${work_SRC}/config-dist.sh .
40   perl -pi -e 's/^(Version:\s+)\S+/${1}'$ver'/' ${work_done}/y2image.spec
41   perl -pi -e 's/^(Source.+-)\S+?(\.tar\.bz2)/${1}'$ver'${2}/' ${work_done}/y2image.spec
42   sleep 2
43   . /work/src/bin/.profile
44   vc y2image
45   rm -fv ${work_done}/*~
46   pwd
47   check_if_valid_source_dir
48   echo "ok"
49 else
50   echo oops
51   exit 1
52 fi