43 lines
1.0 KiB
Bash
Executable File
43 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
|
|
NAME=s3h
|
|
VERSION=`../../s3h.sh -v`
|
|
REVISION=1
|
|
ARCH=all
|
|
|
|
if ! git tag -l |fgrep $VERSION; then
|
|
git tag $VERSION
|
|
git push origin $VERSION
|
|
fi
|
|
|
|
curdir=`dirname $0`
|
|
workdir="$curdir/${NAME}_${VERSION}-${REVISION}_${ARCH}"
|
|
mkdir -p "$workdir"
|
|
|
|
mkdir -p "$workdir/usr/bin"
|
|
wget -O "$workdir/usr/bin/s3h" "https://source.devloop.de/damage/s3h/raw/tag/$VERSION/s3h.sh"
|
|
chmod 0777 "$workdir/usr/bin/s3h"
|
|
|
|
mkdir "$workdir/DEBIAN"
|
|
cat << EOT > "$workdir/DEBIAN/control"
|
|
Package: $NAME
|
|
Version: $VERSION
|
|
Architecture: $ARCH
|
|
Maintainer: Daniel Buschke <damage@devloop.de>
|
|
Description: SSH Session Manager for CLI
|
|
s3h is a SSH Session Manager which is completly running on cli.
|
|
Homepage: https://source.devloop.de/damage/s3h
|
|
Depends: dialog
|
|
EOT
|
|
|
|
dpkg-deb --build --root-owner-group "$workdir"
|
|
if [[ $? -eq 0 ]]; then
|
|
source "$curdir/../credentials"
|
|
curl --user "$GITEA_USER:$GITEA_PASS" \
|
|
--upload-file "${NAME}_${VERSION}-${REVISION}_${ARCH}.deb" \
|
|
https://source.devloop.de/api/packages/damage/debian/pool/stable/main/upload
|
|
|
|
rm -rf "$workdir"
|
|
fi
|