From 47a3723632b82a0d3caf79dbe8ada1eae60dd976 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Sat, 25 Jul 2020 11:20:55 +0300 Subject: rename to cpt-extra --- repo/git/cpt-add | 20 ++++++++++++++++++++ repo/git/cpt-bump | 12 ++++++++++++ repo/git/cpt-commit | 5 +++++ repo/git/cpt-maintainer | 18 ++++++++++++++++++ repo/git/cpt-rel | 24 ++++++++++++++++++++++++ repo/git/cpt-update | 2 ++ repo/git/kiss-add | 20 -------------------- repo/git/kiss-bump | 12 ------------ repo/git/kiss-commit | 5 ----- repo/git/kiss-maintainer | 18 ------------------ repo/git/kiss-rel | 24 ------------------------ repo/git/kiss-update | 2 -- 12 files changed, 81 insertions(+), 81 deletions(-) create mode 100755 repo/git/cpt-add create mode 100755 repo/git/cpt-bump create mode 100755 repo/git/cpt-commit create mode 100755 repo/git/cpt-maintainer create mode 100755 repo/git/cpt-rel create mode 100755 repo/git/cpt-update delete mode 100755 repo/git/kiss-add delete mode 100755 repo/git/kiss-bump delete mode 100755 repo/git/kiss-commit delete mode 100755 repo/git/kiss-maintainer delete mode 100755 repo/git/kiss-rel delete mode 100755 repo/git/kiss-update (limited to 'repo/git') diff --git a/repo/git/cpt-add b/repo/git/cpt-add new file mode 100755 index 0000000..b707555 --- /dev/null +++ b/repo/git/cpt-add @@ -0,0 +1,20 @@ +#!/bin/sh -e +# Commit the current directory as a new package + +case "$1" in + '') set -- . ;; + --help|-h) printf '%s\n' "usage: ${0##*/}"; exit 0; esac + +for pkg; do ( + + cd "$pkg" + read -r ver _ < version || { + printf '%s\n' "could not find version file, are you on a package directory?" + exit 1 + } + + # Unstage all changes and stage the current directory + git reset; git add . + git commit -m "${PWD##*/}: add new package at $ver" + +) done diff --git a/repo/git/cpt-bump b/repo/git/cpt-bump new file mode 100755 index 0000000..e4b758f --- /dev/null +++ b/repo/git/cpt-bump @@ -0,0 +1,12 @@ +#!/bin/sh +# Commit the current directory as a version bump + +case "$1" in --help|-h) printf '%s\n' "usage: ${0##*/}"; exit 0 ; esac + +read ver _ < version || { + printf '%s\n' "could not find version file, are you on a package directory?" + exit 1 +} + +git reset; git add . +git commit -m "${PWD##*/}: bump to $ver" diff --git a/repo/git/cpt-commit b/repo/git/cpt-commit new file mode 100755 index 0000000..ae0315a --- /dev/null +++ b/repo/git/cpt-commit @@ -0,0 +1,5 @@ +#!/bin/sh +# Commit a package without the prefix of 'package:' + +[ "$1" ] || { printf 'usage: %s \n' "${0##*/}"; exit 0 ;} +git reset; git add .; git commit -m "${PWD##*/}: $*" diff --git a/repo/git/cpt-maintainer b/repo/git/cpt-maintainer new file mode 100755 index 0000000..629a893 --- /dev/null +++ b/repo/git/cpt-maintainer @@ -0,0 +1,18 @@ +#!/bin/sh -ef +# Find the maintainer of a package + +# Copyright (C) 2019-2020 Dylan Araps. +# Copyright (C) 2929 Cem Keylan. +# Distributed under the terms of the MIT License + +case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} " ; exit 0 ; esac + +kiss s "$1" | while read -r repo; do cd "$repo" + m=$(git log -1 version 2>/dev/null) ||: + m=${m##*Author: } + m=${m%%>*} + + [ "$m" ] || continue + + printf '=> %s\n%s>\n' "$PWD" "$m" +done diff --git a/repo/git/cpt-rel b/repo/git/cpt-rel new file mode 100755 index 0000000..3c50757 --- /dev/null +++ b/repo/git/cpt-rel @@ -0,0 +1,24 @@ +#!/bin/sh -e +# Bump the release number of a package + +case "$1" in + '') set -- . ;; + --help|-h) printf '%s\n' "usage: ${0##*/}"; exit 0; esac + +for pkg; do ( + + cd "$pkg" + + read -r ver rel < version || { + printf '%s\n' "could not find version file, are you on a package directory?" + exit 1 + } + + # Update the version file with the new release number + printf '%s\n' "$ver $(( rel += 1 ))" > version + + # Unstage all changes and add the version file + git reset; git add version + git commit -m "${PWD##*/}: bump release number" + +) done diff --git a/repo/git/cpt-update b/repo/git/cpt-update new file mode 100755 index 0000000..13f4793 --- /dev/null +++ b/repo/git/cpt-update @@ -0,0 +1,2 @@ +#!/bin/sh + diff --git a/repo/git/kiss-add b/repo/git/kiss-add deleted file mode 100755 index b707555..0000000 --- a/repo/git/kiss-add +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -e -# Commit the current directory as a new package - -case "$1" in - '') set -- . ;; - --help|-h) printf '%s\n' "usage: ${0##*/}"; exit 0; esac - -for pkg; do ( - - cd "$pkg" - read -r ver _ < version || { - printf '%s\n' "could not find version file, are you on a package directory?" - exit 1 - } - - # Unstage all changes and stage the current directory - git reset; git add . - git commit -m "${PWD##*/}: add new package at $ver" - -) done diff --git a/repo/git/kiss-bump b/repo/git/kiss-bump deleted file mode 100755 index e4b758f..0000000 --- a/repo/git/kiss-bump +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Commit the current directory as a version bump - -case "$1" in --help|-h) printf '%s\n' "usage: ${0##*/}"; exit 0 ; esac - -read ver _ < version || { - printf '%s\n' "could not find version file, are you on a package directory?" - exit 1 -} - -git reset; git add . -git commit -m "${PWD##*/}: bump to $ver" diff --git a/repo/git/kiss-commit b/repo/git/kiss-commit deleted file mode 100755 index ae0315a..0000000 --- a/repo/git/kiss-commit +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# Commit a package without the prefix of 'package:' - -[ "$1" ] || { printf 'usage: %s \n' "${0##*/}"; exit 0 ;} -git reset; git add .; git commit -m "${PWD##*/}: $*" diff --git a/repo/git/kiss-maintainer b/repo/git/kiss-maintainer deleted file mode 100755 index 629a893..0000000 --- a/repo/git/kiss-maintainer +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -ef -# Find the maintainer of a package - -# Copyright (C) 2019-2020 Dylan Araps. -# Copyright (C) 2929 Cem Keylan. -# Distributed under the terms of the MIT License - -case "$1" in ''|--help|-h) printf '\033[1;33m-> \033[m%s\n' "usage: ${0##*/} " ; exit 0 ; esac - -kiss s "$1" | while read -r repo; do cd "$repo" - m=$(git log -1 version 2>/dev/null) ||: - m=${m##*Author: } - m=${m%%>*} - - [ "$m" ] || continue - - printf '=> %s\n%s>\n' "$PWD" "$m" -done diff --git a/repo/git/kiss-rel b/repo/git/kiss-rel deleted file mode 100755 index 3c50757..0000000 --- a/repo/git/kiss-rel +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -e -# Bump the release number of a package - -case "$1" in - '') set -- . ;; - --help|-h) printf '%s\n' "usage: ${0##*/}"; exit 0; esac - -for pkg; do ( - - cd "$pkg" - - read -r ver rel < version || { - printf '%s\n' "could not find version file, are you on a package directory?" - exit 1 - } - - # Update the version file with the new release number - printf '%s\n' "$ver $(( rel += 1 ))" > version - - # Unstage all changes and add the version file - git reset; git add version - git commit -m "${PWD##*/}: bump release number" - -) done diff --git a/repo/git/kiss-update b/repo/git/kiss-update deleted file mode 100755 index 13f4793..0000000 --- a/repo/git/kiss-update +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh - -- cgit v1.2.3