aboutsummaryrefslogtreecommitdiff
path: root/pastebin/new.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2018-12-29 16:20:05 -0200
committerEuAndreh <eu@euandre.org>2018-12-29 16:20:05 -0200
commita203ce1f68ebd36552d34290e03a319d6860bcde (patch)
tree2527f60fa8f92933681bc03f700f494895705289 /pastebin/new.sh
parentAdd =test= to default.nix and run in on CI. (diff)
downloadeuandre.org-a203ce1f68ebd36552d34290e03a319d6860bcde.tar.gz
euandre.org-a203ce1f68ebd36552d34290e03a319d6860bcde.tar.xz
Use Getopt::Long and Pod::Usage to build basic CLI.
Diffstat (limited to 'pastebin/new.sh')
-rwxr-xr-xpastebin/new.sh23
1 files changed, 0 insertions, 23 deletions
diff --git a/pastebin/new.sh b/pastebin/new.sh
deleted file mode 100755
index b792e33..0000000
--- a/pastebin/new.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-set -eo pipefail
-cd "$(dirname ${BASH_SOURCE[0]})"
-
-OUTDIR="../site/pastebin"
-
-# Taken from:
-# https://stackoverflow.com/a/49035906
-slugify () {
- echo "$1" | iconv -t ascii//TRANSLIT | sed -r s/[~\^]+//g | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z
-}
-
-if [[ -z "$1" ]]; then
- printf "Type the pastebin title: "
- read title
-else
- title="$1"
-fi
-
-slug=$(slugify "$title")
-
-export title
-cat skeleton.org | envsubst > "$OUTDIR/$slug.org"