-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23e51f6
commit 7d5c48c
Showing
10 changed files
with
139 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 33 additions & 12 deletions
45
...utoEasySetup/Adelaide Zephyrine Charlotte.app/Contents/MacOS/Adelaide Zephyrine Charlotte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,49 @@ | ||
#!/bin/bash | ||
#Wrapper to launch exec_L1 from osascript Launching Terminal | ||
echo "Extracting Wrapper L1" | ||
cat > /tmp/exec_L1 << EOL | ||
#!/bin/bash | ||
# Check if Homebrew is installed | ||
# Check if brew command is detected, if not, install Homebrew | ||
if ! command -v brew &> /dev/null; then | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
echo "Installing Homebrew..." | ||
/bin/bash -c "\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
fi | ||
# Update Homebrew | ||
echo "Updating Homebrew..." | ||
brew update | ||
# Upgrade packages | ||
brew upgrade -y | ||
# Upgrade installed packages | ||
echo "Upgrading installed packages..." | ||
brew upgrade | ||
# Update Homebrew | ||
echo "Updating Homebrew..." | ||
brew update | ||
# Install git if not installed | ||
# Check if git command is detected, if not, install it using brew | ||
if ! command -v git &> /dev/null; then | ||
brew install git -y | ||
echo "Installing git..." | ||
brew install git | ||
fi | ||
# Clone repository if run.sh not detected | ||
if [ ! -f "/Users/user/adelaide-zephyrine-charlotte-assistant/launchcontrol/run.sh" ]; then | ||
git clone https://github.com/albertstarfield/alpaca-electron-zephyrine "/Users/user/adelaide-zephyrine-charlotte-assistant" | ||
# Check if run.sh script exists, if not, clone the repository | ||
if [ ! -f "\$HOME/adelaide-zephyrine-charlotte-assistant/launchcontrol/run.sh" ]; then | ||
echo "Cloning repository..." | ||
git clone --depth=1 https://github.com/albertstarfield/alpaca-electron-zephyrine "\$HOME/adelaide-zephyrine-charlotte-assistant" | ||
fi | ||
# Launch terminal and execute run.sh | ||
osascript -e 'tell application "Terminal" to do script "bash /Users/user/adelaide-zephyrine-charlotte-assistant/launchcontrol/run.sh"' | ||
# Launch terminal and execute run.sh script | ||
echo "Launching terminal..." | ||
osascript -e 'tell application "Terminal" to do script "bash \$HOME/adelaide-zephyrine-charlotte-assistant/launchcontrol/run.sh"' | ||
# Wait for 15 seconds | ||
# Sleep for 15 seconds | ||
echo "Waiting for 15 seconds..." | ||
sleep 15 | ||
open -a safari | ||
EOL | ||
osascript -e 'tell application "Terminal" to do script "/bin/bash -c \"bash /tmp/exec_L1 ; rm /tmp/exec_L1 ; exit\"'\" | ||
sleep 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
#Wrapper to launch exec_L1 from osascript Launching Terminal | ||
echo "Extracting Wrapper L1" | ||
cat > /tmp/exec_L1 << EOL | ||
#!/bin/bash | ||
# Check if brew command is detected, if not, install Homebrew | ||
if ! command -v brew &> /dev/null; then | ||
echo "Installing Homebrew..." | ||
/bin/bash -c "\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
fi | ||
# Update Homebrew | ||
echo "Updating Homebrew..." | ||
brew update | ||
# Upgrade installed packages | ||
echo "Upgrading installed packages..." | ||
brew upgrade | ||
# Update Homebrew | ||
echo "Updating Homebrew..." | ||
brew update | ||
# Check if git command is detected, if not, install it using brew | ||
if ! command -v git &> /dev/null; then | ||
echo "Installing git..." | ||
brew install git | ||
fi | ||
# Check if run.sh script exists, if not, clone the repository | ||
if [ ! -f "\$HOME/adelaide-zephyrine-charlotte-assistant/launchcontrol/run.sh" ]; then | ||
echo "Cloning repository..." | ||
git clone --depth=1 https://github.com/albertstarfield/alpaca-electron-zephyrine "\$HOME/adelaide-zephyrine-charlotte-assistant" | ||
fi | ||
# Launch terminal and execute run.sh script | ||
echo "Launching terminal..." | ||
osascript -e 'tell application "Terminal" to do script "bash \$HOME/adelaide-zephyrine-charlotte-assistant/launchcontrol/run.sh"' | ||
# Sleep for 15 seconds | ||
echo "Waiting for 15 seconds..." | ||
sleep 15 | ||
open -a safari | ||
EOL | ||
osascript -e 'tell application "Terminal" to do script "/bin/bash -c \"bash /tmp/exec_L1 ; rm /tmp/exec_L1 ; exit\"'\" | ||
sleep 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
# Check if the necessary directories exist | ||
if [ ! -d "usr" ] || [ ! -d "launchcontrol" ]; then | ||
echo "Error: Make sure you are on the root directory of the project and you can launch like bash ./builder-tool/macOSdarwinBundle/maclauncherbuilder.sh" | ||
exit 1 | ||
fi | ||
|
||
# Create the .app directory structure | ||
mkdir -p "./builder-tool/autoEasySetup/Adelaide Zephyrine Charlotte.app/Contents/MacOS" | ||
mkdir -p "./builder-tool/autoEasySetup/Adelaide Zephyrine Charlotte.app/Contents/Resources" | ||
|
||
# Copy the icon file | ||
cp "usr/icon/mac/icon.icns" "./builder-tool/autoEasySetup/Adelaide Zephyrine Charlotte.app/Contents/Resources/" | ||
|
||
# Create the Info.plist file | ||
cat > "./builder-tool/autoEasySetup/Adelaide Zephyrine Charlotte.app/Contents/Info.plist" <<EOL | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>Adelaide Zephyrine Charlotte</string> | ||
<key>CFBundleIconFile</key> | ||
<string>icon.icns</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.example.Adelaide-Zephyrine-Charlotte</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>Adelaide Zephyrine Charlotte</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
</dict> | ||
</plist> | ||
EOL | ||
|
||
# Create the executable bash script | ||
cat ./builder-tool/macOSdarwinBundle/exec_L0 > "./builder-tool/autoEasySetup/Adelaide Zephyrine Charlotte.app/Contents/MacOS/Adelaide Zephyrine Charlotte" | ||
|
||
|
||
# Make the script executable | ||
chmod +x "./builder-tool/autoEasySetup/Adelaide Zephyrine Charlotte.app/Contents/MacOS/Adelaide Zephyrine Charlotte" | ||
|
||
echo "App assembled successfully!" |
This file was deleted.
Oops, something went wrong.
File renamed without changes.