From 00bf3e83909df7162343224b6edc659e1d7231d5 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 14 Nov 2017 12:37:28 +1300 Subject: Add Makefile targets for Vim plugin dists This is just an experiment to see how well an automated process can make independently distributable versioned tarballs of my Vim plugins. These are not part of the default `all` or `install` target. They create distribution vim-$name-$ver.tar.gz files in vim/dist. --- dist/vim-plugin.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 dist/vim-plugin.sh (limited to 'dist/vim-plugin.sh') diff --git a/dist/vim-plugin.sh b/dist/vim-plugin.sh new file mode 100644 index 00000000..0f549be4 --- /dev/null +++ b/dist/vim-plugin.sh @@ -0,0 +1,18 @@ +#!/bin/sh +ver=$(awk -Fv 'NR<2&&$0=$NF' VERSION) || exit +mkdir -p -- vim/dist || exit +cd -- vim/dist || exit +for pn ; do + dn=vim-$(printf '%s' "$pn"|sed 's/_/-/g')-$ver + mkdir -p -- "$pn" + for fn in ../*/"$pn".txt ../*/"$pn".vim ; do + [ -e "$fn" ] || continue + sdn=$fn + sdn=${sdn#../} + sdn=${sdn%/*} + mkdir -p -- "$pn"/"$sdn" + cp -- "$fn" "$pn"/"$sdn" + done + tar c "$pn" | gzip > "$dn".tar.gz || exit + rm -r -- "$pn" +done -- cgit v1.2.3