#!/bin/bash

if [ -f $1 ]; then
dpkg-divert --add --rename --divert $1.orig $1
cp $1.orig $1
echo "$1 diverted to $1.orig"
fi


syntax highlighted by Code2HTML, v. 0.9.1