1- #! /bin/bash
1+ #! /bin/sh
22#
33# maestro-ios-device setup script
44# Downloads the correct binary and runs setup
@@ -25,9 +25,9 @@ echo "║ Built by DeviceLab — https://devicelab.dev ║"
2525echo " ╚════════════════════════════════════════════════════════════════╝"
2626echo " "
2727
28- read -p " Continue with installation? [y/N] " -n 1 -r
29- echo
30- if [[ ! $REPLY =~ ^[Yy]$ ] ]; then
28+ printf " Continue with installation? [y/N] "
29+ read -r REPLY
30+ if [ " $REPLY " != " y " ] && [ " $REPLY " != " Y " ]; then
3131 echo " Installation cancelled."
3232 exit 1
3333fi
@@ -37,7 +37,7 @@ echo ""
3737# Check OS
3838OS=$( uname -s)
3939if [ " $OS " != " Darwin" ]; then
40- echo -e " ${RED} Error: Only macOS is supported${NC} "
40+ printf " ${RED} Error: Only macOS is supported${NC} \n "
4141 exit 1
4242fi
4343
@@ -51,7 +51,7 @@ case $ARCH in
5151 ARCH=" arm64"
5252 ;;
5353 * )
54- echo -e " ${RED} Error: Unsupported architecture: $ARCH ${NC} "
54+ printf " ${RED} Error: Unsupported architecture: $ARCH ${NC} \n "
5555 exit 1
5656 ;;
5757esac
@@ -65,7 +65,7 @@ echo ""
6565# Find where maestro is installed
6666MAESTRO_PATH=$( which maestro 2> /dev/null || true)
6767if [ -z " $MAESTRO_PATH " ]; then
68- echo -e " ${RED} Error: Maestro not found in PATH. Install Maestro first: https://maestro.mobile.dev${NC} "
68+ printf " ${RED} Error: Maestro not found in PATH. Install Maestro first: https://maestro.mobile.dev${NC} \n "
6969 exit 1
7070fi
7171
@@ -77,7 +77,7 @@ echo ""
7777echo " 📥 Downloading ${BINARY} ..."
7878TMP_FILE=$( mktemp)
7979if ! curl -fsSL " $DOWNLOAD_URL " -o " $TMP_FILE " ; then
80- echo -e " ${RED} Error: Failed to download binary${NC} "
80+ printf " ${RED} Error: Failed to download binary${NC} \n "
8181 echo " URL: $DOWNLOAD_URL "
8282 rm -f " $TMP_FILE "
8383 exit 1
@@ -88,7 +88,7 @@ echo "📦 Installing to $INSTALL_DIR/$BINARY_NAME..."
8888mv " $TMP_FILE " " $INSTALL_DIR /$BINARY_NAME "
8989chmod +x " $INSTALL_DIR /$BINARY_NAME "
9090
91- echo -e " ${GREEN} ✅ Binary installed${NC} "
91+ printf " ${GREEN} ✅ Binary installed${NC} \n "
9292echo " "
9393
9494# Run setup command
@@ -97,4 +97,4 @@ echo ""
9797" $INSTALL_DIR /$BINARY_NAME " setup
9898
9999echo " "
100- echo -e " ${GREEN} ✅ Installation complete!${NC} "
100+ printf " ${GREEN} ✅ Installation complete!${NC} \n "
0 commit comments