# Example usage:
# 1. place tarball to be released in git root dir
-# 2. scripts/make-distrofiles.sh
+# 2. scripts/make-distrofiles.sh -s
# 3. scripts/build-in-obs.sh knot-resolver-latest
project=home:CZ-NIC:$1
#!/bin/bash -e
+# Run with -s to include *.symbols files.
+
package=knot-resolver
+withsymbols=false
+
+while getopts "s" o; do
+ case "${o}" in
+ s)
+ withsymbols=true
+ ;;
+ *)
+ ;;
+ esac
+done
+shift $((OPTIND-1))
+
cd "$(git rev-parse --show-toplevel)"
version=$(ls ${package}*.tar.xz | sed "s/${package}-\(.*\).tar.xz/\1/")
sed -i "s/__VERSION__/${version}/g" "${file}"
done
+# Optionally remove symbols file
+if [ "$withsymbols" = false ]; then
+ rm distro/deb/debian/*.symbols
+fi
+
# Rename archive to debian format
mv "${package}-${version}.tar.xz" "${package}_${version}.orig.tar.xz"