File tree Expand file tree Collapse file tree 1 file changed +20
-6
lines changed
Expand file tree Collapse file tree 1 file changed +20
-6
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
33run_exe () {
4- for D in OpenLeetCodeUI; do
5- if [ -f " ${D} /OpenLeetCodeUI" ]; then
6- echo " Running OpenLeetCodeUI in ${D} "
7- " ${D} /OpenLeetCodeUI" --problem_builds_dir=$( pwd)
4+ if [[ " $( uname) " == " Darwin" ]]; then
5+ app_path=" ./OpenLeetCodeUI/OpenLeetCodeUI.app/Contents/MacOS/OpenLeetCodeUI"
6+ echo " app_path: $app_path "
7+ if [ -x " $app_path " ]; then
8+ echo " Running OpenLeetCodeUI"
9+ " $app_path " --problem_builds_dir=" $( pwd) "
810 exit
11+ else
12+ echo " Error: OpenLeetCodeUI executable not found or not executable at $app_path "
913 fi
10- done
11- echo " No OpenLeetCodeUI found in $( pwd) /OpenLeetCodeUI directory."
14+ elif [[ " $( uname) " == " Linux" ]]; then
15+ for D in OpenLeetCodeUI; do
16+ if [ -f " ${D} /OpenLeetCodeUI" ]; then
17+ echo " Running OpenLeetCodeUI in ${D} "
18+ " ${D} /OpenLeetCodeUI.app" --problem_builds_dir=$( pwd)
19+ exit
20+ fi
21+ done
22+ echo " No OpenLeetCodeUI found in $( pwd) /OpenLeetCodeUI directory."
23+ else
24+ echo " Only Mac and Linux are supported."
25+ fi
1226}
1327
1428pushd " $( dirname " $0 " ) " > /dev/null
You can’t perform that action at this time.
0 commit comments