dotconf/bin/mkdiff

25 lines
480 B
Plaintext
Raw Normal View History

2020-10-12 07:40:40 -06:00
#!/bin/sh
2021-08-31 10:12:25 -06:00
name=$(make show=FULLPKGNAME)
2020-10-12 07:40:40 -06:00
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..."
2022-08-13 06:14:01 -06:00
rsync -a ${HOME}/patches/ suah.dev:/var/www/deftly.net/patches/
2020-10-12 07:40:40 -06:00
URL="https://deftly.net/patches/${name}.diff"
2021-03-09 11:25:00 -07:00
echo ${URL}
if [ ! -z $DISPLAY ]; then
echo -n "${URL}" | xclip
echo "Copied '${URL}' to clipboard.."
fi