all repos — dotfiles @ f713de8850ef33ed54eb44bbec2af3fd797ad8b7

my *nix dotfiles

bin/up (view raw)

 1#!/usr/bin/env bash
 2
 3LATEST_SCROT="$HOME/pics/scrots/latest.png"
 4
 5upload() {
 6    out="$(curl -s -F "file=@$1" -F "key=$(pw -s fsrv)" https://x.icyphox.sh)"
 7    [[ ! "$NO_CP" -eq 1 ]] && {
 8        case "$OSTYPE" in
 9            darwin*)
10                printf "$out" | pbcopy
11                ;;
12            *)
13                printf "$out" | xclip -sel c
14                ;;
15        esac
16    }
17    printf "$out\n"
18}
19
20if [ "$1" == "l" ]; then
21    upload "$LATEST_SCROT"
22elif [ "$1" != "l" ]; then
23   upload "$1"
24fi