Skip to content

Commit

Permalink
Windows busybox: Adjust Windows Operational test: Use busybox.exe
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
  • Loading branch information
TinCanTech committed Feb 12, 2024
1 parent 928c736 commit 18f4c3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
2 changes: 1 addition & 1 deletion wop-test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ copy "%WORK_DIR%\distro\windows\%SYS_ARCH%\*" "%WORK_DIR%\easyrsa3\bin"
copy "%WORK_DIR%\distro\windows\EasyRSA-Start.bat" "%WORK_DIR%\easyrsa3\EasyRSA-Start.bat"
PATH=%PATH%;%WORK_DIR%\easyrsa3\bin;C:\PROGRA~1\openssl

cmd /C "easyrsa3\bin\sh.exe wop-test.sh"
cmd /C "easyrsa3\bin\busybox.exe sh wop-test.sh"
IF ERRORLEVEL 1 (
echo Error occurred, Exit 1
exit /B 1 )
Expand Down
19 changes: 1 addition & 18 deletions wop-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,13 @@
cd easyrsa3 || { echo "ERROR: Cannot find easyrsa3 directory"; exit 1; }

setup_path="${EASYRSA:-$PWD}"
export PATH="$setup_path;$setup_path/bin;$PATH"
export PATH="$setup_path;$PATH"
export HOME="$setup_path"

# This prevents reading from a user's .mkshrc if they have one.
# A user who runs mksh for other purposes might have it
export ENV="/disable-env"

# Verify required externals are present
extern_list="which awk cat cp mkdir printf rm"
for f in $extern_list; do
if ! which "${f}.exe" >/dev/null 2>&1; then
echo ""
echo "FATAL: EasyRSA Shell init is missing a required external file:"
echo " ${f}.exe"
echo " Your installation is incomplete and cannot function without the required"
echo " files."
echo ""
echo " Press enter to exit."
#shellcheck disable=SC2162
read
exit 1
fi
done

# set_var is defined as any vars file needs it.
# This is the same as in easyrsa, but we _don't_ export
set_var() {
Expand Down

0 comments on commit 18f4c3e

Please sign in to comment.