diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..df80c36 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/credentials +build/deb/*.deb diff --git a/build/credentials.example b/build/credentials.example new file mode 100644 index 0000000..6aa157b --- /dev/null +++ b/build/credentials.example @@ -0,0 +1,2 @@ +GITEA_USER=damage +GITEA_PASS=1c3bf0cbb22728f204b45e7a02a10dc6d28ae9dc diff --git a/build/deb/build.sh b/build/deb/build.sh new file mode 100755 index 0000000..9f4cd4c --- /dev/null +++ b/build/deb/build.sh @@ -0,0 +1,37 @@ +#!/bin/bash + + +NAME=s3h +VERSION=1.0 +REVISION=1 +ARCH=all + +curdir=`dirname $0` +workdir="$curdir/${NAME}_${VERSION}-${REVISION}_${ARCH}" +mkdir -p "$workdir" + +mkdir -p "$workdir/usr/bin" +cp "$curdir/../../s3h.sh" "$workdir/usr/bin/s3h" +chmod 0777 "$workdir/usr/bin/s3h" + +mkdir "$workdir/DEBIAN" +cat << EOT > "$workdir/DEBIAN/control" +Package: $NAME +Version: $VERSION +Architecture: $ARCH +Maintainer: Daniel Buschke +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" + +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"