dotconf/bin/mkdiff

25 lines
480 B
Bash
Executable File

#!/bin/sh
name=$(make show=FULLPKGNAME)
fname="${HOME}/patches/${name}.diff"
if [ -d CVS ]; then
cvs diff . > "$fname"
else
if got status >/dev/null; then
got diff . > "$fname"
else
git diff . > "$fname"
fi
fi
echo "Created: $fname"
echo "Syncing..."
rsync -a ${HOME}/patches/ suah.dev:/var/www/deftly.net/patches/
URL="https://deftly.net/patches/${name}.diff"
echo ${URL}
if [ ! -z $DISPLAY ]; then
echo -n "${URL}" | xclip
echo "Copied '${URL}' to clipboard.."
fi