forked from NetRadiator/backup-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage-deb
More file actions
executable file
·31 lines (26 loc) · 804 Bytes
/
package-deb
File metadata and controls
executable file
·31 lines (26 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# Usage: script/package-deb
# Script to build a deb release package from the current HEAD version.
# The package version comes from the debian/changelog file so that should
# be edited before running this.
set -e
# Change into project root
cd "$(dirname "$0")"/..
# Basic package name and version.
PKG_BASE="github-backup-utils"
PKG_VERS="$(git describe --tags)"
PKG_NAME="${PKG_BASE}-${PKG_VERS}"
PKG_HEAD="$(git rev-parse HEAD)"
# Run git-archive to generate tarball
rm -rf dist/debuild
trap "rm -rf dist/debuild" EXIT
mkdir -p dist/debuild
distdir="$(pwd)/dist/debuild/$PKG_NAME"
git clone -q . "$distdir"
cd "$distdir"
git checkout -q "$PKG_HEAD"
debuild -uc -us 1>&2
cd ..
files=$(ls -1 *.deb *.tar.gz *.dsc *.changes)
mv $files ../
for f in $files; do echo "dist/$f"; done