-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoit.sh
More file actions
executable file
·57 lines (47 loc) · 881 Bytes
/
doit.sh
File metadata and controls
executable file
·57 lines (47 loc) · 881 Bytes
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
#!/usr/bin/env bash
#pkgs=(gtest quantlib quantlib-python quickfix git-publish-branch aws-iam)
pkgs=(s3funnel-git)
aurp=$(type -P aurploader)
files=()
build()
{
mkdir -p build
cd build
for i in ${pkgs[@]}; do
mkdir -p $i
cd $i
cp ../../$i/* .
makepkg -f
makepkg -f --source
cd ..
done
}
clean()
{
rm -rf build
}
publish()
{
if [ ! -x "$aurp" ]; then
echo "You need aurploader to push packages to AUR"
exit 1
fi
for i in ${pkgs[@]}; do
p=$(find "build/$i" -name "$i*.src.tar.gz")
files+=($p)
done
$aurp ${files[@]}
}
usage()
{
cat <<EOF
Usage: ...
EOF
}
trap 'kill 0; echo;' TERM HUP QUIT INT
case "$1" in
build) shift; build "$*" ;;
clean) shift; clean "$*" ;;
publish) shift; publish "$*" ;;
*) shift; usage ;;
esac