# Get all necessary paths.
pwd=`pwd`
- base=`printf '%s' "$2" | sed "s|\~|$HOME|"` # expand ~, some sh don't do it
+ base=`printf '%s' "$2" | sed "s|~|$HOME|"` # expand ~, some sh don't do it
base=`dirname "$base"`
source=`printf '%s' "$pwd/$1" | sed "s|$base/||"`
target=`basename "$2"`