#!/bin/csh -f # gitpullreview # ----------------------------------------------------------------------------- # C shell script to review changes to Git while pulling them. # ----------------------------------------------------------------------------- # Revision History: # $Log$ # ----------------------------------------------------------------------------- set backup_dir = "/$PWD:t.old" echo "Copying from $PWD to $backup_dir..." echo "===================================================================" echo rsyncupdate --log --del . $backup_dir rsyncupdate --log --del . $backup_dir echo "===================================================================" echo "Pulling from git..." echo "===================================================================" echo git pull git pull echo "===================================================================" windiff . $backup_dir while (1 == 1) echo -n "Copy these changes to $backup_dir (y/n)? " set accept=$< if ($accept == "y") then break else if ($accept == "n") then exit 0 endif end echo "Copying from $PWD to $backup_dir..." echo "===================================================================" echo rsyncupdate --log --del . $backup_dir rsyncupdate --log --del . $backup_dir echo "==================================================================="