all repos — dotfiles @ c8b57d5f847c9d840b3174674a1a083aa0434ef1

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