#!/bin/sh # Test that we correctly preserve symlinks when saving a file ROOT=$abs_top_builddir/build/test-put-symlink LENSES=$abs_top_srcdir/lenses HOSTS=$ROOT/etc/hosts REAL_HOSTS=$ROOT/other/hosts rm -rf $ROOT mkdir -p $(dirname $HOSTS) mkdir -p $(dirname $REAL_HOSTS) cat < $REAL_HOSTS 127.0.0.1 localhost EOF (cd $(dirname $HOSTS) && ln -s ../other/hosts $(basename $HOSTS)) augtool --nostdinc -I $LENSES -b -r $ROOT > /dev/null </dev/null; then echo "/other/hosts does not contain the modification" exit 1 fi