Fix and comment.
This commit is contained in:
parent
1c9e224975
commit
17fe04103c
|
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# http://deb.debian.org/debian/pool/main/s/shellcheck/shellcheck_0.7.0-2.dsc
|
||||
# http://deb.debian.org/debian/pool/main/s/shellcheck/shellcheck_0.7.0-2~bpo10+1.dsc
|
||||
|
||||
if [ "$1" == "-h" ]; then
|
||||
echo "Usage: `basename $0` Takes a build location and a dsc file
|
||||
|
|
@ -14,23 +12,30 @@ BUILD_DIR=$1/build
|
|||
mkdir -p ${BUILD_DIR}
|
||||
cd ${BUILD_DIR}
|
||||
|
||||
# Download the package to build
|
||||
gbp import-dsc -v --allow-unauthenticated $2
|
||||
|
||||
cd *
|
||||
|
||||
# Install the build deps
|
||||
mk-build-deps debian/control
|
||||
DEPS_DEB=$(ls *deb)
|
||||
dpkg -i ${DEPS_DEB}
|
||||
apt-get -f install
|
||||
apt-get -f install -y
|
||||
rm ${DEPS_DEB}
|
||||
|
||||
# Build the packages
|
||||
dpkg-buildpackage -us -uc -b
|
||||
|
||||
# Remove the build deps
|
||||
APT_REMOVE=${DEPS_DEB%%\_*}
|
||||
apt-get -y remove --purge ${APT_REMOVE}
|
||||
apt-get -y autoremove
|
||||
|
||||
# Install the built debs
|
||||
INSTALL_DEB=${APT_REMOVE%%-*}
|
||||
dpkg -i ../${INSTALL_DEB}_*deb
|
||||
|
||||
apt-get -f install -y
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue