Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
executable file 21 lines (18 sloc) 495 Bytes
#!/bin/bash
function require(){
PROGRAM="$1"
ALTERNATIVE="$2"
if command -v $PROGRAM >/dev/null 2>&1; then
echo $PROGRAM
return
else
if command -v $ALTERNATIVE >/dev/null 2>&1; then
echo $ALTERNATIVE;
else
echo "Missing required program: $PROGRAM"
exit 1
fi
fi
}
COPY=$(require pbcopy "xsel -b")
echo -n "Your password is in another castle" | $COPY
You can’t perform that action at this time.