all repos — dotfiles @ 9e8687309488aad0c29456fb4fb9ee642e0cb365

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