-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.sh
executable file
·26 lines (20 loc) · 875 Bytes
/
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
#!/bin/sh
dir=$(dirname `readlink -f $0`)
project=$(basename "$dir")
debname="smsbackuprestore"
mnt=/scratchbox/users/$USER/home/$USER/$project
if ! mount | grep "$project on $mnt"; then
sudo /scratchbox/sbin/sbox_ctl start
sudo /scratchbox/sbin/sbox_sync
mkdir -p $mnt
sudo mount -o bind $dir $mnt
fi
/scratchbox/login -d $HOME find -maxdepth 2 -name $debname*.deb -delete
/scratchbox/login -d $HOME find -maxdepth 2 -name $debname*.changes -delete
/scratchbox/login -d $HOME find -maxdepth 2 -name $debname*.dsc -delete
/scratchbox/login -d $HOME find -maxdepth 2 -name $debname*.gz -delete
/scratchbox/login -d $HOME/$project qmake
/scratchbox/login -d $HOME/$project dpkg-buildpackage
deb=`/scratchbox/login -d $HOME find -maxdepth 1 -name $debname*.deb`
echo copying $deb from sbox $HOME to $HOME/$project
/scratchbox/login -d $HOME cp $deb $HOME/$project