Tightened build script
This commit is contained in:
parent
2792dc5e68
commit
16bbe738a7
35
build-deb.sh
35
build-deb.sh
|
@ -1,40 +1,33 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
TORCH_VERSION=$(git describe --tags --abbrev=0)
|
||||||
|
PROJECT=torch-agent-$TORCH_VERSION
|
||||||
|
|
||||||
if [[ -z "${DEBEMAIL}" ]]; then
|
if [[ -z "${DEBEMAIL}" ]]; then
|
||||||
DEBEMAIL="$1"
|
DEBEMAIL="$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${DEBEMAIL}" ]]; then
|
if [[ -z "${DEBEMAIL}" ]]; then
|
||||||
echo "E-mail address required for packaging signing with gpg key!"
|
echo "E-mail address required for packaging signing with gpg key!"
|
||||||
echo "Usage: ./make-pkg.sh EMAIL"
|
echo "Usage: ./build-deb.sh EMAIL"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BUILD_DIR=build_deb
|
BUILD_DIR=dist
|
||||||
TORCH_VERSION=$(git describe --tags --abbrev=0)
|
DEB_DIR=$BUILD_DIR/$PROJECT
|
||||||
DEBIAN_PKG=torch-agent-$TORCH_VERSION
|
|
||||||
|
|
||||||
rm -rf $BUILD_DIR
|
rm -rf $BUILD_DIR/*
|
||||||
rm -rf dist
|
|
||||||
|
|
||||||
mkdir $BUILD_DIR
|
|
||||||
|
|
||||||
python3 setup.py clean
|
|
||||||
python3 setup.py sdist
|
python3 setup.py sdist
|
||||||
cp dist/$DEBIAN_PKG.tar.gz $BUILD_DIR/
|
|
||||||
|
mkdir -p $DEB_DIR/src/etc/torch
|
||||||
|
cp -r debian $DEB_DIR/
|
||||||
|
cp torch.conf $DEB_DIR/src/etc/torch/
|
||||||
|
|
||||||
cd $BUILD_DIR
|
cd $BUILD_DIR
|
||||||
tar -xzmf $DEBIAN_PKG.tar.gz
|
tar -xzmf $PROJECT.tar.gz
|
||||||
cd ..
|
|
||||||
|
|
||||||
PKG_ROOT=$BUILD_DIR/$DEBIAN_PKG
|
|
||||||
|
|
||||||
mkdir -p $PKG_ROOT/src/etc/torch
|
|
||||||
|
|
||||||
cp -r debian $PKG_ROOT/
|
|
||||||
cp torch.conf $PKG_ROOT/src/etc/torch/
|
|
||||||
|
|
||||||
cd $PKG_ROOT
|
|
||||||
|
|
||||||
|
cd $PROJECT
|
||||||
export USER=`whoami`
|
export USER=`whoami`
|
||||||
dh_make --createorig -e $DEBEMAIL -s -y
|
dh_make --createorig -e $DEBEMAIL -s -y
|
||||||
dpkg-buildpackage -k$DEBEMAIL
|
dpkg-buildpackage -k$DEBEMAIL
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user