aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_add.sh
diff options
context:
space:
mode:
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