1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00
Files
gimp/app/tests/create_test_env.sh
Jan Tojnar 3279bb3351 tools: Use env in shebangs
Having perl and bash in /usr/bin/ is less common than having them on PATH
(e.g. Nix does not have them there).
2022-03-18 16:05:58 +00:00

30 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Copy tests resources
for dir in files gimpdir gimpdir-empty; do
rm -rf "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/${dir}"
cp -r "${MESON_SOURCE_ROOT}/${MESON_SUBDIR}/${dir}" \
"${MESON_BUILD_ROOT}/${MESON_SUBDIR}"
done
# Link to Color icon theme for tests
IconsRoot="${MESON_SOURCE_ROOT}/icons/Color"
IconsDirs=$(find "${IconsRoot}" -name [0-9]* -type d -printf '%f\n' | sort -n)
for dir in ${IconsDirs} ; do
mkdir "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimp-test-icon-theme/hicolor/${dir}x${dir}" -p
LnName="${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimp-test-icon-theme/hicolor/${dir}x${dir}/apps"
rm -rf "${LnName}"
ln -s "${IconsRoot}/${dir}" "${LnName}"
done
LnName="${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimp-test-icon-theme/hicolor/index.theme"
rm -rf "${LnName}"
ln -s "${IconsRoot}/index.theme" "${LnName}"
# Create output dirs
rm -rf "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimpdir-output"
for dir in brushes gradients patterns; do
mkdir -p "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimpdir-output/${dir}"
done