Skip to content

Commit ab9528c

Browse files
fix: build.sh
1 parent 54f29fb commit ab9528c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

utils/scripts/build.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,24 @@ if [[ "$fdroidFlag" == "fdroid" ]]; then
4343
if [ -n "$tmpdir" ]; then
4444
echo "true" > "$tmpdir/fdroid.bool"
4545
fi
46-
cordova plugin remove com.foxdebug.acode.rk.exec.proot
46+
47+
# Remove only if installed
48+
if [ -d "plugins/com.foxdebug.acode.rk.exec.proot" ]; then
49+
cordova plugin remove com.foxdebug.acode.rk.exec.proot
50+
fi
4751
else
4852
if [ -n "$tmpdir" ]; then
4953
echo "false" > "$tmpdir/fdroid.bool"
5054
fi
51-
cordova plugin add src/plugins/proot/
55+
56+
# Add only if the src exists and not already installed
57+
if [ -d "src/plugins/proot" ] && [ ! -d "plugins/com.foxdebug.acode.rk.exec.proot" ]; then
58+
cordova plugin add src/plugins/proot/
59+
fi
5260
fi
5361

5462

63+
5564
# Normalize mode values
5665
if [ "$mode" = "p" ] || [ "$mode" = "prod" ]
5766
then

0 commit comments

Comments
 (0)