initial commit
[goodguy/history.git] / cinelerra-5.0 / build / bld_package.sh
1 #!/bin/bash
2
3 if [ $# -ne 2 ]; then
4   echo "usage: $0 <os> <typ>"
5   echo "  os = centos | fedora | ubuntu | suse"
6   echo " typ = static | dynamic"
7   exit 1
8 fi
9
10 dir="$1"
11 path="/home"
12 bld="google_code"
13 proj="cinelerra"
14 base="cinelerra-4.6.mod"
15
16 centos="centos-7.0-1406"
17 fedora="fedora-21"
18 suse="opensuse-13.2"
19 ubuntu="ubuntu-14.04.1"
20
21 eval os="\${$dir}"
22 if [ -z "$os" ]; then
23   echo "unknown os: $dir"
24 fi
25
26 if [ ! -d "$path/$dir/$bld/$proj/$base" ]; then
27   echo "missing $bld/$proj/$base in $path/$dir"
28   exit 1
29 fi
30
31 typ=$2
32 sfx=`uname -m`
33 if [ "$typ" = "static" ]; then
34   sfx="$sfx-static"
35 elif [ "$typ" != "dynamic" ]; then
36   echo "err: suffix must be [static | dynamic]"
37   exit 1
38 fi
39
40 cd "$path/$dir/$bld/$proj/$base"
41 tar -C bin -cJf "../$base-$os-$sfx.txz" .
42 rm -f "$path/$dir/$base-$os-$sfx.txz"
43 mv "../$base-$os-$sfx.txz" "$path/$dir/."
44