diff options
author | Cem Keylan <cem@ckyln.com> | 2020-05-28 16:45:43 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-05-28 16:45:43 +0300 |
commit | 1dabf5a8d511db458dd529588e57a8ed8185787a (patch) | |
tree | c5905caa9b93fa4c63ee5e8e8dbdccd53d5aca53 | |
parent | 7bfa97d6fa2452d0517c4f820e44033b5a50cd50 (diff) | |
download | cpt-extra-1dabf5a8d511db458dd529588e57a8ed8185787a.tar.gz |
added new utilities, changed repository structure20200528
-rw-r--r-- | README | 23 | ||||
-rwxr-xr-x | alt/kiss-exec (renamed from kiss-exec) | 0 | ||||
-rwxr-xr-x | alt/kiss-getchoice (renamed from kiss-getchoice) | 0 | ||||
-rwxr-xr-x | other/kiss-changelog (renamed from kiss-changelog) | 0 | ||||
-rwxr-xr-x | other/kiss-orphans (renamed from kiss-orphans) | 0 | ||||
-rwxr-xr-x | repo/git/kiss-add | 13 | ||||
-rwxr-xr-x | repo/git/kiss-bump | 12 | ||||
-rwxr-xr-x | repo/git/kiss-commit | 5 | ||||
-rwxr-xr-x | repo/git/kiss-maintainer | 18 | ||||
-rwxr-xr-x | repo/git/kiss-rel | 16 | ||||
-rwxr-xr-x | repo/git/kiss-update | 2 | ||||
-rwxr-xr-x | repo/kiss-cargo-urlgen (renamed from kiss-cargo-urlgen) | 0 | ||||
-rwxr-xr-x | repo/kiss-cargolock-urlgen (renamed from kiss-cargolock-urlgen) | 0 | ||||
-rwxr-xr-x | repo/kiss-reporevdepends (renamed from kiss-reporevdepends) | 0 |
14 files changed, 81 insertions, 8 deletions
@@ -16,14 +16,27 @@ kiss). You can install by doing - for script in kiss-*; do - install -Dm755 "$script" "/usr/local/bin/$script" + find . -type f -name 'kiss-*' | while read -r script; do + install -Dm755 "$script" "/usr/local/bin/${script##*/}" done Or install the `kiss-extra` package on Carbs Linux. +Repository structure +-------------------- + +Scripts are dividied into categoried folders. + + + / + ├── alt - scripts related to the alternatives system. + ├── other - self explanatory + └── repo - scripts for repository management + └── git - scripts for git operations, commit messages etc. + + New Scripts ----------- @@ -54,9 +67,3 @@ Licensing This repository contains scripts that were initially in the package manager itself. Some of these were initially authored by Dylan Araps. License notices are made where needed. - - -Carbs Linux directory ---------------------- - -Carbs Linux directory is for diff --git a/kiss-exec b/alt/kiss-exec index d2b3217..d2b3217 100755 --- a/kiss-exec +++ b/alt/kiss-exec diff --git a/kiss-getchoice b/alt/kiss-getchoice index 75521b4..75521b4 100755 --- a/kiss-getchoice +++ b/alt/kiss-getchoice diff --git a/kiss-changelog b/other/kiss-changelog index ed323d8..ed323d8 100755 --- a/kiss-changelog +++ b/other/kiss-changelog diff --git a/kiss-orphans b/other/kiss-orphans index fd8b9d1..fd8b9d1 100755 --- a/kiss-orphans +++ b/other/kiss-orphans diff --git a/repo/git/kiss-add b/repo/git/kiss-add new file mode 100755 index 0000000..3f29946 --- /dev/null +++ b/repo/git/kiss-add @@ -0,0 +1,13 @@ +#!/bin/sh +# Commit the current directory as a new package + +case "$1" in --help|-h) printf '%s\n' "usage: ${0##*/}"; exit 0; esac + +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" diff --git a/repo/git/kiss-bump b/repo/git/kiss-bump new file mode 100755 index 0000000..e4b758f --- /dev/null +++ b/repo/git/kiss-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/kiss-commit b/repo/git/kiss-commit new file mode 100755 index 0000000..ae0315a --- /dev/null +++ b/repo/git/kiss-commit @@ -0,0 +1,5 @@ +#!/bin/sh +# Commit a package without the prefix of 'package:' + +[ "$1" ] || { printf 'usage: %s <commit-msg without package name>\n' "${0##*/}"; exit 0 ;} +git reset; git add .; git commit -m "${PWD##*/}: $*" diff --git a/repo/git/kiss-maintainer b/repo/git/kiss-maintainer new file mode 100755 index 0000000..629a893 --- /dev/null +++ b/repo/git/kiss-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##*/} <pkg>" ; 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 new file mode 100755 index 0000000..ae76c6e --- /dev/null +++ b/repo/git/kiss-rel @@ -0,0 +1,16 @@ +#!/bin/sh +# Bump the release number of a package + +case "$1" in --help|-h) printf '%s\n' "usage: ${0##*/}"; exit 0; esac + +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" diff --git a/repo/git/kiss-update b/repo/git/kiss-update new file mode 100755 index 0000000..13f4793 --- /dev/null +++ b/repo/git/kiss-update @@ -0,0 +1,2 @@ +#!/bin/sh + diff --git a/kiss-cargo-urlgen b/repo/kiss-cargo-urlgen index 2105329..2105329 100755 --- a/kiss-cargo-urlgen +++ b/repo/kiss-cargo-urlgen diff --git a/kiss-cargolock-urlgen b/repo/kiss-cargolock-urlgen index 7d78a6a..7d78a6a 100755 --- a/kiss-cargolock-urlgen +++ b/repo/kiss-cargolock-urlgen diff --git a/kiss-reporevdepends b/repo/kiss-reporevdepends index 59262f0..59262f0 100755 --- a/kiss-reporevdepends +++ b/repo/kiss-reporevdepends |