Skip to content
Snippets Groups Projects
Commit 5e02d2e5 authored by Éloïs's avatar Éloïs
Browse files

add entry.sh

parent 505213de
No related branches found
No related tags found
No related merge requests found
Pipeline #2684 canceled
#!/bin/bash
# Test environment
if [[ ! -d /builds ]]; then
echo "In order to use this image, you must mount the working directory to /builds"
exit 1
fi
REFERENCE=$(ls -d /builds/* | head -1)
if [[ -z "${REFERENCE}" ]]; then
echo "Aborting because of empty working directory"
exit 1
fi
# Prepare environment
_durs_prepare() {
touch /durs/reference || exit 1
chown --reference "${REFERENCE}" /durs/reference || exit 1
chown -R durs:durs /builds/* || exit 1
}
# Terminate
_durs_terminate() {
chown -R --reference /durs/reference /builds/* || exit 1
rm -f /durs/reference
exit ${1}
}
# Prepare and execute building
_durs_prepare
su - durs
_durs_terminate $?
entry.sh 0 → 100644
#!/bin/bash
set -e
export HOME=/tmp/home
mkdir -p $HOME
# Initialize the wine prefix (virtual windows installation)
export WINEPREFIX=/tmp/wine
mkdir -p $WINEPREFIX
# FIXME: Make the wine prefix initialization faster
wineboot &> /dev/null
# Put libstdc++ and some other mingw dlls in WINEPATH
# This must work for x86_64 and i686
P1=$(dirname $(find /usr -name libwinpthread-1.dll))
export WINEPATH="$(ls -d /usr/lib/gcc/*-w64-mingw32/*win32);$P1"
exec "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment