dotfiles

Dash Eclipse's dotfiles
git clone git://ezup.dev/dotfiles.git
Log | Files | Refs | README | LICENSE

commit 1dd256519a6d0361cc6e8d7a1fc3d92e7d1565be
parent d36e5e1ebb08e28d899873d717eef9e13ae7563b
Author: Dash Eclipse <dashezup@disroot.org>
Date:   Tue, 22 Mar 2022 12:00:45 +0000

refactor: remove git-arc

Diffstat:
D.local/bin/git-arc | 48------------------------------------------------
1 file changed, 0 insertions(+), 48 deletions(-)

diff --git a/.local/bin/git-arc b/.local/bin/git-arc @@ -1,48 +0,0 @@ -#!/usr/bin/env sh - -slugify() { - # https://github.com/Mayeu/slugify/blob/master/slugify#L24 - export LANG=POSIX - export LC_ALL=POSIX - sed -e 's/[^[:alnum:]]/-/g' \ - | tr -s '-' \ - | sed -e 's/-$//' -} - -modify_zipnote() { - filename="$1" - note="$(zipnote $filename)" - author="$(git log -1 --pretty='%an')" - info="$(git --no-pager show --pretty='format:%C(auto)%h (%s, %ai)' --stat)" - echo "${note}\nAuthor: ${author}\n${info}" | zipnote -w "$filename" -} - -usage() { - : "${progname:="${0##*/}"}" - cat <<_EOF | GREP_COLORS='ms=1' egrep --color "$progname|$" -Usage: $progname [tar|tar.gz|zip] create archive -_EOF - exit 0 -} - -case $1 in - "") FORMAT=tar.gz;; - tar|tar.gz|zip) FORMAT=$1;; - *) usage;; -esac - -reponame="$(basename $(git rev-parse --show-toplevel))" -filename="${reponame}_$(git --no-pager log -1 --oneline --pretty='%as %s' | slugify).${FORMAT}" - -if [ -f "$filename" ]; then - echo "Found exsiting archive: $(tput bold)${filename}$(tput sgr0)" - exit 1 -else - git archive --format="$FORMAT" -o "$filename" --prefix="${reponame}/" HEAD - echo "$filename" - if [ "$FORMAT" = "zip" ]; then - modify_zipnote "$filename" - unzip -l "$filename" - fi -fi -exit 0