Author: branden Date: 2003-08-29 15:11:05 -0500 (Fri, 29 Aug 2003) New Revision: 456
Modified: trunk/debian/xserver-common.postrm.in trunk/debian/xserver-xfree86.postrm.in Log: debian/xserver-{common,xfree86}.postrm.in: per suggestion from Aaron M. Ucko, simplify baroque construction "[ -n $(cat filename 2> /dev/null) ]" to "[ -s filename ]" Modified: trunk/debian/xserver-common.postrm.in =================================================================== --- trunk/debian/xserver-common.postrm.in 2003-08-29 02:51:23 UTC (rev 455) +++ trunk/debian/xserver-common.postrm.in 2003-08-29 20:11:05 UTC (rev 456) @@ -37,7 +37,7 @@ fgrep -vx "$THIS_PACKAGE" "$XWRAPPER_CONFIG_ROSTER" > \ "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" || true # is there anything left? - if [ -n "$(cat "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" 2> /dev/null)" ]; then + if [ -s "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" ]; then # yes, replace the roster file mv "$XWRAPPER_CONFIG_ROSTER.dpkg-tmp" "$XWRAPPER_CONFIG_ROSTER" else Modified: trunk/debian/xserver-xfree86.postrm.in =================================================================== --- trunk/debian/xserver-xfree86.postrm.in 2003-08-29 02:51:23 UTC (rev 455) +++ trunk/debian/xserver-xfree86.postrm.in 2003-08-29 20:11:05 UTC (rev 456) @@ -34,7 +34,7 @@ fgrep -vx "$THIS_PACKAGE" "$SERVER_SYMLINK_ROSTER" > \ "$SERVER_SYMLINK_ROSTER.dpkg-tmp" || true # is there anything left? - if [ -n "$(cat "$SERVER_SYMLINK_ROSTER.dpkg-tmp" 2> /dev/null)" ]; then + if [ -s "$SERVER_SYMLINK_ROSTER.dpkg-tmp" ]; then # yes, replace the roster file mv "$SERVER_SYMLINK_ROSTER.dpkg-tmp" "$SERVER_SYMLINK_ROSTER" else @@ -70,7 +70,7 @@ fgrep -vx "$THIS_PACKAGE" "$XF86CONFIG_ROSTER" > \ "$XF86CONFIG_ROSTER.dpkg-tmp" || true # is there anything left? - if [ -n "$(cat "$XF86CONFIG_ROSTER.dpkg-tmp" 2> /dev/null)" ]; then + if [ -s "$XF86CONFIG_ROSTER.dpkg-tmp" ]; then # yes, replace the roster file mv "$XF86CONFIG_ROSTER.dpkg-tmp" "$XF86CONFIG_ROSTER" else