sq_umount() {
    case @build_os@ in
        linux*)
            @sq_fusermount@ -u $1
            ;;
        *)
            umount $1
            ;;
    esac
}

sq_is_mountpoint() {
    mount | grep -q "$1"
}

find_compressors() {
  touch "$WORKDIR/comp_input"
  compressors=
  for comp in @sq_mksquashfs_compressors@; do
    if mksquashfs "$WORKDIR/comp_input" "$WORKDIR/comp_output" -comp $comp >/dev/null 2>/dev/null; then
      compressors="$compressors $comp"
    fi
    rm -f "$WORKDIR/comp_output"
  done
  if [ -z "$compressors" ]; then
    echo "No common compressor support between squashfuse and mksquashfs!"
    exit 1
  fi
  echo "Found compressors:$compressors"
}

sq_skip_notify() {
  case @build_os@ in
    darwin*)
      if otool -L ./squashfuse | grep -q fuse-t; then
        echo "yes"
        return 0
      fi
    ;;
  esac
  echo "no"
  return 1
}
