TORch: Illuminating the Path to your Node
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 lines
707 B

#!/bin/bash
if [[ -z "${DEB_EMAIL}" ]]; then
DEB_EMAIL="$1"
fi
if [[ -z "${DEB_EMAIL}" ]]; then
echo "E-mail address required for packaging signing with gpg key!"
echo "Usage: ./build-deb.sh EMAIL"
exit 1
fi
TORCH_VERSION=$(git describe --tags --abbrev=0)
PROJECT=torch-agent-$TORCH_VERSION
BUILD_DIR=dist
DEB_DIR=$BUILD_DIR/$PROJECT
rm -rf "${BUILD_DIR:?}/"*
pip3 install -r requirements.txt
python3 setup.py sdist
mkdir -p "$DEB_DIR/src/etc/torch"
cp -r debian "$DEB_DIR/"
cp torch.conf "$DEB_DIR/src/etc/torch/"
cd $BUILD_DIR || exit
tar -xzmf "$PROJECT.tar.gz"
cd "$PROJECT" || exit
export USER
USER=$(whoami)
dh_make --createorig -e "$DEB_EMAIL" -s -y
dpkg-buildpackage -k"$DEB_EMAIL"