From d4e6648afd61205136c98fdc56cf151eb437a078 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 22 Dec 2018 18:19:29 -0200 Subject: Move external scripts to bin/. --- scripts/bump.sh | 21 --------------------- scripts/git-blame-someone-else | 21 --------------------- scripts/sl | 13 ------------- scripts/sleepsort | 20 -------------------- 4 files changed, 75 deletions(-) delete mode 100755 scripts/bump.sh delete mode 100755 scripts/git-blame-someone-else delete mode 100755 scripts/sl delete mode 100755 scripts/sleepsort (limited to 'scripts') diff --git a/scripts/bump.sh b/scripts/bump.sh deleted file mode 100755 index 86eed54..0000000 --- a/scripts/bump.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -function latest_version() { - git tag | sort -V | tail -n 1 -} - -function overflow_bump() { - IFS=".$IFS" - read a b c - if [[ "$b" == 999 ]]; then - echo $((a + 1)).0.0 - elif [[ "$c" == 999 ]]; then - echo $a.$((b + 1)).0 - else - echo $a.$b.$((c + 1)) - fi -} - -latest_version | overflow_bump - -echo "$1" | overflow_bump diff --git a/scripts/git-blame-someone-else b/scripts/git-blame-someone-else deleted file mode 100755 index dd71826..0000000 --- a/scripts/git-blame-someone-else +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# Taken from https://github.com/jayphelps/git-blame-someone-else/ - -if [ $# -ne 2 ]; then - >&2 echo "Usage: $0 " - exit 1 -fi - -AUTHOR=$1 -AUTHOR_NAME=$(echo $AUTHOR | perl -wlne '/^(.*?)\s*<.*>$/ and print $1') -AUTHOR_EMAIL=$(echo $AUTHOR | perl -wlne '/^.*\s*<(.*)>$/ and print $1') -COMMIT=$(git rev-parse --short $2) - -{ - GIT_SEQUENCE_EDITOR="sed -i -e 's/^pick $COMMIT/edit $COMMIT/'" git rebase -i $COMMIT~1^^ - GIT_COMMITTER_NAME="$AUTHOR_NAME" GIT_COMMITTER_EMAIL="$AUTHOR_EMAIL" git commit --amend --no-edit --author="$AUTHOR" - # git rebase --continue -} &> /dev/null - -echo "$AUTHOR_NAME is now the author of $COMMIT. You're officially an asshole."; diff --git a/scripts/sl b/scripts/sl deleted file mode 100755 index 2333462..0000000 --- a/scripts/sl +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -# Taken from: -# https://gir.st/blog/sl-alt.htm - -# sl - prints a mirror image of ls. (C) 2017 Tobias Girstmair, https://gir.st/, GPLv3 - -LEN=$(ls "$@" |wc -L) # get the length of the longest line - -ls "$@" | rev | while read -r line -do - printf "%${LEN}.${LEN}s\\n" "$line" | sed 's/^\(\s\+\)\(\S\+\)/\2\1/' -done \ No newline at end of file diff --git a/scripts/sleepsort b/scripts/sleepsort deleted file mode 100755 index ea20fcb..0000000 --- a/scripts/sleepsort +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# Taken from: -# https://www.quora.com/What-is-the-strangest-sorting-algorithm/answer/Nipun-Ramakrishnan - -function f() { - sleep "$1" - echo "$1" -} - -while [ -n "$1" ] -do - f "$1" & - shift -done - -wait - -# example usage: -# sleepsort 5 3 6 3 6 3 1 4 7 -- cgit v1.2.3