-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sh
executable file
·71 lines (59 loc) · 2.33 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
nuget_project_name="Laerdal.FFmpeg"
nuget_output_folder="$nuget_project_name.Output"
usage(){
echo "usage: ./build.sh [-p|--package [audio|full|full-gpl|https|https-gpl|min|min-gpl|video]] [-c|--clean-output] [-v|--verbose] [-o|--output path]"
echo "parameters:"
echo " -p | --package [audio|full|full-gpl|https|https-gpl|min|min-gpl|video] Multiple -p paramaters can be added. See https://github.com/tanersener/mobile-ffmpeg for more information"
echo " -c | --clean-output Cleans the output before building"
echo " -v | --verbose Enable verbose build details from msbuild tasks"
echo " -o | --output [path] Output path"
echo " -h | --help Prints this message"
echo
}
while [ "$1" != "" ]; do
case $1 in
-p | --package ) shift
package_variants="${package_variants} $1"
;;
-o | --output ) shift
output_path=$1
;;
-c | --clean-output ) clean_output=1
;;
-v | --verbose ) verbose=1
;;
-h | --help ) usage
exit
;;
* ) echo
echo "### Wrong parameter: $1 ###"
echo
usage
exit 1
esac
shift
done
if [ "$clean_output" = "1" ]; then
echo ""
echo "### CLEAN OUTPUT ###"
echo ""
rm -rf $nuget_output_folder
echo "Deleted : $nuget_output_folder"
fi
if [ -z "$package_variants" ]; then
package_variants="audio full full-gpl https https-gpl min min-gpl video"
fi
echo "package_variants : $package_variants"
for package_variant in $package_variants
do
. ./build.single.sh
done
if [ ! -z "$output_path" ]; then
echo
echo "### COPY FILES TO OUTPUT ###"
echo
mkdir -p $output_path
cp -a $nuget_output_folder/. $output_path
echo "Copied into $output_path"
fi