small fix for gen-arhives - stagit - default description
(HTM) git clone git://thinkerwim.org/stagit.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 5b3196cf24d250c64927511e2c995eff5f432aa0
(DIR) parent b0bf8d9a824ca2c63c6001b837e566b2c5a45037
(HTM) Author: wim <wim@thinkerwim.org>
Date: Sun, 12 Mar 2023 08:28:50 +0100
small fix for gen-arhives
Diffstat:
M stagit-gen-archives-from-tags | 7 ++++---
M stagit.c | 3 ---
2 files changed, 4 insertions(+), 6 deletions(-)
---
(DIR) diff --git a/stagit-gen-archives-from-tags b/stagit-gen-archives-from-tags
@@ -1,15 +1,16 @@
-#!/bin/bash
+#!/usr/local/bin/bash
#usage stagit-gen-archives-from-tags repodir
#Description generates git archives in de present directory/snapshot
#Script made by Wim Stockman wim at thinkerwim dot org on
#Created on 2023-03-12
mkdir -p snapshot
+cd $1
git tag > /tmp/taglist
-reponame=${PWD##*/}
+reponame=${1##*/}
reponame=${reponame%.git*/}
while read -r line;
do
-git archive --format=tar.gz --prefix="$reponame-${line#v}/" $line > "/tmp/$reponame-${line#v}.tar.gz"
+git archive --format=tar.gz --prefix="$reponame-${line#v}/" $line > "$OLDPWD/snapshot/$reponame-${line#v}.tar.gz"
done < "/tmp/taglist"
(DIR) diff --git a/stagit.c b/stagit.c
@@ -1181,9 +1181,6 @@ writerefs(FILE *fp)
xmlencode(fp, s, strlen(s));
fputs("</td><td>", fp);
if(j)
- //create archive
- git_archive_options options = GIT_ARCHIVE_OPTIONS_INIT;
-
fprintf(fp, "<a href=\"%ssnapshot/\%s-%s.tar.gz\">%s-%s.tar.gz</a> ", relpath,name,s,name,s);
if(!j)
xmlencode(fp, ci->summary, strlen(ci->summary));