Magellan Linux

Diff of /tags/mage-0_4_114/make-tarball.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 647 by niro, Tue Jan 1 16:42:14 2008 UTC revision 795 by niro, Sat Jan 31 16:22:41 2009 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
3  temp=$(mktemp -d)  temp=$(mktemp -d)
4  cvs_module="magellan-src/mage"  svn_base_uri="svn://cvs.magellan-linux.de/magellan-source"
5  rev_keyword="mage"  svn_module="mage"
6  tarball_prefix="mage"  rev_keyword="${svn_module}"
7  destination="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/mage/"  tarball_prefix="${svn_module}"
8    destination="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/${svn_module}/"
9    
10  latest_revision=$(cvs status -v make-tarball.sh | grep -A1 "Existing Tags:" | sed -e 's/Existing Tags://' -e 's/ //g' -e '/^$/d' | /bin/awk '{ print $1; exit; }')  latest_revision=$(svn ls --verbose ${svn_base_uri}/tags | grep ${rev_keyword} | sort -n | sed -e 's:/::' |  awk '{ print $6; exit; }')
11  latest_version=$(echo ${latest_revision} | sed -e "s:${rev_keyword}-::" -e 's:_:.:g')  latest_version=$(echo ${latest_revision} | sed -e "s:${rev_keyword}-::" -e 's:_:.:g')
12    
13  echo -n "building tarball for ${latest_version}... "  echo -n "building tarball for ${latest_version}... "
14  cd ${temp}  cd ${temp}
15  cvs -z3 -d :pserver:anonymous:@cvs.magellan-linux.de:/magellan-cvs checkout -P -r ${latest_revision} ${cvs_module}  svn checkout ${svn_base_uri}/tags/${latest_revision} ${svn_module}
16  mv ${temp}/${cvs_module} ${tarball_prefix}-${latest_version}  # fix some import issues
17    if [[ -d ${temp}/${svn_module}/${svn_module} ]]
18    then
19     mv ${temp}/${svn_module}/${svn_module}/* ${temp}/${svn_module}
20     rm -rf ${temp}/${svn_module}/${svn_module}
21    fi
22    mv ${temp}/${svn_module} ${tarball_prefix}-${latest_version}
23  rm ./${tarball_prefix}-${latest_version}/make-tarball.sh  rm ./${tarball_prefix}-${latest_version}/make-tarball.sh
24  find ./${tarball_prefix}-${latest_version} -name CVS | xargs rm -r  find ./${tarball_prefix}-${latest_version} -name .svn | xargs rm -r
25  find ./${tarball_prefix}-${latest_version} -name .cvsignore | xargs rm  find ./${tarball_prefix}-${latest_version} -name .svnignore | xargs rm
26  tar cvjf ${tarball_prefix}-${latest_version}.tar.bz2 ./${tarball_prefix}-${latest_version}  tar cvjf ${tarball_prefix}-${latest_version}.tar.bz2 ./${tarball_prefix}-${latest_version}
27  scp ${tarball_prefix}-${latest_version}.tar.bz2 ${destination}  scp ${tarball_prefix}-${latest_version}.tar.bz2 ${destination}
28    
29  if [[ -d ${temp} ]]  # if [[ -d ${temp} ]]
30  then  # then
31   rm -rf ${temp}  # rm -rf ${temp}
32  fi  # fi
33    echo DEBUG:${temp}
34  exit 0  exit 0
   

Legend:
Removed from v.647  
changed lines
  Added in v.795