Home | History | Annotate | Download | only in tests
      1 #/usr/bin/env sh
      2 set -e
      3 
      4 make="make -C $lz4_root"
      5 for cmd in install uninstall; do
      6   for upper in DUMMY PREFIX EXEC_PREFIX LIBDIR INCLUDEDIR PKGCONFIGDIR BINDIR MANDIR MAN1DIR ; do
      7     lower=$(echo $upper | tr '[:upper:]' '[:lower:]')
      8     tmp_lower="$(pwd)/tmp-lower-$lower/"
      9     tmp_upper="$(pwd)/tmp-upper-$lower/"
     10     echo $make $cmd DESTDIR="$tmp_upper" $upper="test"
     11     $make $cmd DESTDIR="$tmp_upper" $upper="test" >/dev/null
     12     echo $make $cmd DESTDIR="$tmp_lower" $lower="test"
     13     $make $cmd DESTDIR="$tmp_lower" $lower="test" >/dev/null
     14     command diff -r "$tmp_lower" "$tmp_upper" && echo "SAME!" || false
     15     if [ "x$cmd" = "xuninstall" ]; then
     16       test -z "$(find "$tmp_lower" -type f)" && echo "EMPTY!" || false
     17       rm -rf "$tmp_upper" "$tmp_lower"
     18     fi
     19   done
     20 done
     21