From c2b706ff2f3aa42d58a03febad1d1b8f8d5a1142 Mon Sep 17 00:00:00 2001 From: bdunahu Date: Sun, 4 Jan 2026 13:13:39 -0700 Subject: remove unnecessary nested guix dir --- guix/kolwynia/home/bdunahu/files/.local/bin/upload | 43 ---------------------- 1 file changed, 43 deletions(-) delete mode 100755 guix/kolwynia/home/bdunahu/files/.local/bin/upload (limited to 'guix/kolwynia/home/bdunahu/files/.local/bin/upload') diff --git a/guix/kolwynia/home/bdunahu/files/.local/bin/upload b/guix/kolwynia/home/bdunahu/files/.local/bin/upload deleted file mode 100755 index a2db9b5..0000000 --- a/guix/kolwynia/home/bdunahu/files/.local/bin/upload +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - - -err() { echo "Usage: - upload [OPTIONS] -Options: - -t: time from now to expire in hours (default: 48) - file: a path to a file. If this is not given, receives input from stdin." && exit 1 ;} - -hours=48 - -while getopts ":t:" opt; do - case $opt in - t) - hours=$OPTARG - if [[ $OPTARG =~ ^-?[0-9]+$ ]]; then - hours=$OPTARG - else - err - fi - ;; - *) - err - ;; - esac -done - -shift $((OPTIND -1)) - -if [ -n "$1" ] && [ -f "$1" ]; then - source="$1" - ext="${1##*.}" -else - source=$(mktemp) - ext="txt" - cat > "$source" - chmod a+r "$source" -fi - -dest="$(cat /dev/random | tr -dc 'a-zA-Z0-9' | fold -w 4 | head -n 1)-$(date -d "+$hours hours" +%s).$ext" - -scp "$source" "root@operationnull.com:/var/www/operationnull/paste/$dest" && - echo "https://operationnull.com/paste/$dest" -- cgit v1.2.3