all repos — dotfiles @ 75b2e42cdd9dd6f5b7263a7651d4979d5b2404f7

my *nix dotfiles

bin/icyup.sh (view raw)

 1#!/usr/bin/env bash
 2
 3n=3; fn=$(tr -cd '[:alnum:]' < /dev/urandom | head -c$n)
 4
 5latest="$HOME/pics/scrots/latest.png"
 6
 7upload() {
 8	file=$1
 9	ext="${file##*.}"
10	fullname="$fn.$ext"
11	scp -P 443 "$1" emerald:icywww/uploads/"$fullname"
12	echo "https://x.icyphox.sh/$fullname"
13	echo "https://x.icyphox.sh/$fullname" | xclip -selection clipboard
14}
15
16if [ "$1" == "l" ]; then
17    upload "$latest" 
18elif [ "$1" != "l" ]; then
19   upload "$1" 
20else
21	echo "no path specified :v"
22fi