-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRun_Mac_Player.command
More file actions
executable file
·38 lines (33 loc) · 1.26 KB
/
Copy pathRun_Mac_Player.command
File metadata and controls
executable file
·38 lines (33 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# Get the directory of the active script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
clear
echo "============================================="
echo "🎓 Udemy Offline Player — macOS Startup Helper"
echo "============================================="
echo ""
# Check for the app in the script folder or Applications directory
if [ -d "$DIR/Udemy Offline Player.app" ]; then
TARGET_APP="$DIR/Udemy Offline Player.app"
elif [ -d "/Applications/Udemy Offline Player.app" ]; then
TARGET_APP="/Applications/Udemy Offline Player.app"
else
TARGET_APP=""
fi
if [ -n "$TARGET_APP" ]; then
echo "🔒 Bypassing Gatekeeper security warning..."
# Remove quarantine attribute recursively
xattr -cr "$TARGET_APP"
# Attempt to self-sign the application (silencing warnings if codesign fails/isn't installed)
codesign --force --deep --sign - "$TARGET_APP" 2>/dev/null
echo "🚀 Launching Udemy Offline Player..."
open "$TARGET_APP"
echo "Done! You can close this window."
else
echo "❌ Error: Could not find 'Udemy Offline Player.app'."
echo "Please make sure 'Udemy Offline Player.app' is in the same folder as this script,"
echo "or has been dragged into your /Applications folder."
echo ""
echo "Press any key to exit..."
read -n 1
fi