summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b872227)
ako pukne sed, funkcija se nastavi i pregazi fajl, odnosno fajl ostane
prazan.
}
# by jelly, Tue, 15 Mar 2005 14:04:21 +0100
}
# by jelly, Tue, 15 Mar 2005 14:04:21 +0100
+# modified by ico, Mon, 6 Jun 2005 11:58:08 +0200
# A sed wrapper, to use instead of perl -pi -e
# - relatively safe in-place s///g
# - takes care of symlinks and ownership
# A sed wrapper, to use instead of perl -pi -e
# - relatively safe in-place s///g
# - takes care of symlinks and ownership
fi
[ -h "$i" ] && i=$(readlink -f "$i")
sed "$sedcmd" "$i" > "$i.dpkg-tmp"
fi
[ -h "$i" ] && i=$(readlink -f "$i")
sed "$sedcmd" "$i" > "$i.dpkg-tmp"
+ if [ ! "$?" = "0" ]; then
+ rm "$i.dpkg-tmp"
+ echo "cp_check_and_sed: Problem with sed" 1>&2
+ return 5
+ fi
if ! cmp -s "$i" "$i.dpkg-tmp" 2>&1 >/dev/null; then
cp_mv "$i.dpkg-tmp" "$i"
else
if ! cmp -s "$i" "$i.dpkg-tmp" 2>&1 >/dev/null; then
cp_mv "$i.dpkg-tmp" "$i"
else
# by ddzeko, Mon, 21 Mar 2005 13:35:42 +0100
cp_yes_no () {
[ "$CP_SCRIPT_DEBUG" ] && set -vx
# by ddzeko, Mon, 21 Mar 2005 13:35:42 +0100
cp_yes_no () {
[ "$CP_SCRIPT_DEBUG" ] && set -vx