t_dp_dw_datax_3_hook_dqc-build.sh 479 B

12345678910
  1. #!/bin/bash
  2. export PATH=/home/tops/bin/:${PATH}
  3. export temppath=$1
  4. cd $temppath/rpm
  5. sed -i "s/^Release:.*$/Release: "$4"/" $2.spec
  6. sed -i "s/^Version:.*$/Version: "$3"/" $2.spec
  7. export TAGS=TAG:`svn info|grep "URL"|cut -d ":" -f 2-|sed "s/^ //g"|awk -F "trunk|tags|branche" '{print $1}'`tags/$2_A_`echo $3|tr "." "_"`_$4
  8. sed -i "s#%description#%description \n $TAGS#g" $2.spec
  9. /usr/local/bin/rpm_create -p /home/admin -v $3 -r $4 $2.spec -k
  10. mv `find . -name $2-$3-$4*rpm` .