channel-switch: use sys/ioctl.h instead of stropts.h
[rofl0r-MacGeiger.git] / create-dist.sh
blob1eafacd60a275737e5178c9aa422ffdad5a58e8d
1 #!/bin/sh
2 # this is a script to create a release tarball.
3 # it requires the sources of concol in ../concol.
4 # you need to pass a version as VER env variable.
5 # e.g. VER=0.0.0 ./create-dist.sh
7 if [ -z "$VER" ] ; then
8 echo set VER!
9 exit
12 set -e
14 prog=macgeiger
15 concol=$PWD/../concol
16 progrepo=$PWD
18 me=`pwd`
19 tempdir=/tmp/"$prog"-0000
20 tempdir_b=$tempdir/"$prog"-"$VER"
21 rm -rf $tempdir_b
22 mkdir -p $tempdir_b
24 this="$PWD"
26 cd $tempdir_b
27 git clone "$concol" concol
28 git clone "$progrepo" $prog
29 mv $prog/* .
30 mv dist/Makefile.dist Makefile
32 sed -i 's@"../concol/@"concol/@g' $prog.c
33 sed -i 's@../lib/@libulz/@g' Makefile
35 rm -rf $prog
37 rm -rf concol/.git
38 rm -f concol/Makefile
40 cd $tempdir
41 tar cjf "$prog"-"$VER".tar.bz2 "$prog"-"$VER"
42 mv "$prog"-"$VER".tar.bz2 $me/"$prog"-"$VER".tar.bz2
43 ls -la $me/"$prog"-$VER.tar.bz2
44 rm -rf "$tempdir"