File indexing completed on 2024-05-19 04:32:41

0001 #!/bin/sh
0002 
0003 # Usage
0004 #   linux-release <version string> optional: <existing sourceforge dir>  <sourceforge username> <skip-build>
0005 # e.g:
0006 #   build  only     : linux-release.sh 2.0.3-beta2 
0007 #   build and upload: linux-release.sh 2.0.3-beta2 "Kst\\ 2.0.3" username
0008 #   upload only     : linux-release.sh 2.0.3-beta2 "Kst\\ 2.0.3" username skip
0009 #   
0010 set -x
0011 
0012 kst_install_prefix=kst-$1
0013 
0014 machine_type=`uname -m`
0015 binarytar=${kst_install_prefix}-binary-${machine_type}.tar
0016 
0017 
0018 if [ -z ${4} ]
0019 then
0020         cmake ../kst -Dkst_release=1 -Dkst_merge_files=1 -Dkst_version_string=$1 -Dkst_install_prefix=$kst_install_prefix -Dkst_3rdparty_build=1 -Dkst_deploy=1
0021         cd 3rdparty
0022         make -j8
0023         cd ..
0024         make -j8
0025         make 
0026         make install/strip
0027         strip ${kst_install_prefix}/lib
0028         strip ${kst_install_prefix}/lib/kst2/plugins/*
0029         
0030     rm  ${binarytar}.gz
0031     tar cf ${binarytar} ${kst_install_prefix}
0032     gzip -9 ${binarytar}
0033     make package_source
0034 fi
0035 
0036 
0037 if [ ! -z ${3} ]
0038 then
0039         # spaces in $2 "Kst\\ 2.0.3"
0040         scp \
0041         ${binarytar}.gz \
0042         ${kst_install_prefix}.tar.gz \
0043         ${3},kst@frs.sourceforge.net:"/home/frs/project/k/ks/kst/${2}"
0044 fi