all repos — dotfiles @ 9d4daac1b851d9a89b0a429277c3d4d64331812d

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    case "$OSTYPE" in
 8        darwin*)
 9            printf "$out" | pbcopy
10            ;;
11        *)
12            printf "$out" | xclip -sel c
13            ;;
14    esac
15    printf "$out\n"
16}
17
18if [ "$1" == "l" ]; then
19    upload "$LATEST_SCROT"
20elif [ "$1" != "l" ]; then
21   upload "$1"
22fi