summaryrefslogtreecommitdiffstats
path: root/distro/scripts/make-archive.sh
diff options
context:
space:
mode:
Diffstat (limited to 'distro/scripts/make-archive.sh')
-rwxr-xr-xdistro/scripts/make-archive.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/distro/scripts/make-archive.sh b/distro/scripts/make-archive.sh
new file mode 100755
index 0000000..6cca67c
--- /dev/null
+++ b/distro/scripts/make-archive.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# create archive from current source using git
+
+VERSION=$(git log --oneline -n1 --grep="^VERSION" | rev | cut -d' ' -f1 | rev)
+
+NAMEVER=libyang-$VERSION
+ARCHIVE=$NAMEVER.tar.gz
+
+git archive --format tgz --output $ARCHIVE --prefix $NAMEVER/ HEAD
+mkdir -p pkg/archives/dev/
+mv $ARCHIVE pkg/archives/dev/
+
+# apkg expects stdout to list archive files
+echo pkg/archives/dev/$ARCHIVE