Skip to content

Commit debbb3b

Browse files
author
Sune Bøegh
committed
Test
1 parent ff25946 commit debbb3b

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

modify.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ for fn in ${files[@]}; do
1111
cp -f "$fn" "$fn.bak"
1212
fi
1313

14-
sed -i "s/$IMAGE_VERSION_MARKER/$IMAGE_SET_VERSION/" "$fn"
14+
if [[ "$OSTYPE" == "darwin"* ]]; then
15+
sed -i "" "s/$IMAGE_VERSION_MARKER/$IMAGE_SET_VERSION/" "$fn" || echo "Modify failed."
16+
else
17+
sed -i "s/$IMAGE_VERSION_MARKER/$IMAGE_SET_VERSION/" "$fn"
18+
fi
1519

1620
if [[ $2 == "--dev" ]]; then
1721
docker build --progress plain --no-cache -t boeegh/dotnet-runx:dev . || echo "Docker build failed."

start.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@
44
appDll=$(grep -so -E '([^\"]*)\.dll' web.config)
55
if [ ! $appDll ]
66
then
7-
# app: find any executable, assume main dll has same name
8-
app=$(find . -type f -perm -u+x)
9-
if [ $app ]
10-
then
7+
# app: find first executable, assume main dll has same name
8+
app=$(find . -type f -perm -u+x -print | head -n 1)
9+
if [ ! -z "$app" ]; then
1110
appDll="$app.dll"
1211
fi
1312
fi
1413

1514
# todo: support for enforcing ownership of non-root user?
1615

1716
# no dll found?
18-
if [ ! $appDll ] || [ ! -f $appDll ]
17+
if [ ! "$appDll" ] || [ ! -f "$appDll" ]
1918
then
20-
notFound=$([ $appDll ] && echo "Identified main dll as $appDll, however it was not found.")
19+
notFound=$([ "$appDll" ] && echo "Identified main dll as $appDll, however it was not found.")
2120
echo -e "Unable to autostart application dll (alpine will not execute binary). $notFound\n"
2221
echo "Listing files present in $PWD:"
2322
ls .

0 commit comments

Comments
 (0)