forked from JesseFarebro/deadbeef-librarybrowser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makerelease.sh
executable file
·39 lines (30 loc) · 979 Bytes
/
makerelease.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
#!/bin/bash
PACKAGENAME=deadbeef-lb
DATE=$1
if [ -z "$DATE" ]; then
DATE=`date +%Y%m%d`
fi
FLAG=$2
BUILDROOT=`pwd`
DISTPACKAGENAME=${PACKAGENAME}-devel
INSTALLDIR=${BUILDROOT}/../install
DATE=`date +%Y%m%d`
BINTARGET=${BUILDROOT}/../${PACKAGENAME}${FLAG}_${DATE}.tar.gz
SRCTARGET=${BUILDROOT}/../${PACKAGENAME}${FLAG}_${DATE}_src.tar.gz
rm -rf ${INSTALLDIR}
mkdir -p ${INSTALLDIR}/${PACKAGENAME}
make DESTDIR=${INSTALLDIR} install
if [ -d ${INSTALLDIR} ]; then
cd ${INSTALLDIR}
for file in ./usr/local/lib/deadbeef/*.so.0.0.0; do
cp -v $file ./${PACKAGENAME}/`basename $file .0.0.0`
done
cp -v ${BUILDROOT}/README ./${PACKAGENAME}/
cp -v ${BUILDROOT}/*install.sh ./${PACKAGENAME}/
cp -v ${BUILDROOT}/*remove.sh ./${PACKAGENAME}/
tar -czf $BINTARGET ${PACKAGENAME}
cd ${BUILDROOT}
fi
rm -f ${DISTPACKAGENAME}.tar.gz
make dist PACKAGE=${PACKAGENAME} && mv ${DISTPACKAGENAME}.tar.gz ${SRCTARGET}
ls -lh ${SRCTARGET} ${BINTARGET}