Skip to content

Commit 417ecdb

Browse files
committed
Allow re-runs of the plugin
Re-running the plugin is now possible, but we output warnings that it is a good idea to make a clean run before building releases. Contributes to #10.
1 parent 4bf0143 commit 417ecdb

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

linuxdeploy-plugin-conda.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ else
8585
fi
8686

8787
if [ -d "$APPDIR"/usr/conda ]; then
88-
echo "Error: directory exists: $APPDIR/usr/conda"
89-
exit 1
88+
echo "Warning: conda prefix directory exists: $APPDIR/usr/conda"
89+
echo "Please make sure you perform a clean build before releases to make sure your process works properly."
9090
fi
9191

9292
ARCH=${ARCH:-x86_64}
@@ -118,7 +118,7 @@ bash "$CONDA_DOWNLOAD_DIR"/"$miniconda_installer_filename" -b -p "$APPDIR"/usr/c
118118
. "$APPDIR"/usr/conda/bin/activate
119119

120120
# we don't want to touch the system, therefore using a temporary home
121-
mkdir _temp_home
121+
mkdir -p _temp_home
122122
export HOME=$(readlink -f _temp_home)
123123

124124
# conda-forge is used by many conda packages, therefore we'll add that channel by default
@@ -161,7 +161,11 @@ fi
161161
mkdir -p "$APPDIR"/usr/bin/
162162
pushd "$APPDIR"
163163
for i in usr/conda/bin/*; do
164-
ln -s ../../"$i" usr/bin/
164+
if [ -f usr/bin/"$(basename "$i")" ]; then
165+
echo "Warning: symlink exists, will not be touched: usr/bin/$i"
166+
else
167+
ln -s ../../"$i" usr/bin/
168+
fi
165169
done
166170
popd
167171

0 commit comments

Comments
 (0)