aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_add.sh
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-06-28 23:08:01 +0200
committerLoïc Hoguin <[email protected]>2015-06-28 23:12:10 +0200
commit857f595ed5293a9dae42ef64062461ee35547663 (patch)
tree27b3fd1690f1141ef51c89ec0507762e2976ae3e /pkg_add.sh
parent9a2dd5dfb20b2b5dbb08d9441a184815b5337cbe (diff)
downloaderlang.mk-857f595ed5293a9dae42ef64062461ee35547663.tar.gz
erlang.mk-857f595ed5293a9dae42ef64062461ee35547663.tar.bz2
erlang.mk-857f595ed5293a9dae42ef64062461ee35547663.zip
Bundle the package index directly inside erlang.mk
If you were using the index file as a "lock file", bear with me for a moment, equivalent functionality will soon be added. :-)
Diffstat (limited to 'pkg_add.sh')
-rwxr-xr-xpkg_add.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/pkg_add.sh b/pkg_add.sh
index 9c26baa..7684d26 100755
--- a/pkg_add.sh
+++ b/pkg_add.sh
@@ -1,10 +1,16 @@
#!/bin/sh
-PKG_FILE="packages.v2.tsv"
-LINE="$1\t$2\t$3\t$4\t$5\t$6\n"
+PKG_FILE="index/$1.mk"
+CONTENTS="PACKAGES += $1
+pkg_$1_name = $1
+pkg_$1_description = $6
+pkg_$1_homepage = $5
+pkg_$1_fetch = $2
+pkg_$1_repo = $3
+pkg_$1_commit = $4
+"
COMMIT="Add package $1 to the index"
-printf "$LINE" >> $PKG_FILE
-sort $PKG_FILE -o $PKG_FILE
-make
-git commit -m "$COMMIT" packages.*
+printf "$CONTENTS" > $PKG_FILE
+git add $PKG_FILE
+git commit -m "$COMMIT" $PKG_FILE