-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_shortcuts_shell.sh
More file actions
52 lines (40 loc) · 1.41 KB
/
Copy pathcreate_shortcuts_shell.sh
File metadata and controls
52 lines (40 loc) · 1.41 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# MushLog Desktop Shortcuts Creator for macOS (Shell version)
# Creates desktop shortcuts using symbolic links
echo "Creating MushLog desktop shortcuts..."
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Check if we're on macOS
if [[ "$OSTYPE" != "darwin"* ]]; then
echo "Error: This script is designed for macOS only."
exit 1
fi
# Desktop path
DESKTOP="$HOME/Desktop"
# Launch scripts to create shortcuts for
LAUNCH_SCRIPTS=("launch_mushlog.sh" "launch_mushview.sh" "launch_import_tool.sh")
for script in "${LAUNCH_SCRIPTS[@]}"; do
SCRIPT_PATH="$SCRIPT_DIR/$script"
SHORTCUT_PATH="$DESKTOP/$script"
if [[ -f "$SCRIPT_PATH" ]]; then
echo "Creating shortcut for $script..."
# Remove existing shortcut if it exists
rm -f "$SHORTCUT_PATH"
# Create symbolic link
ln -s "$SCRIPT_PATH" "$SHORTCUT_PATH"
if [[ $? -eq 0 ]]; then
echo "✅ Shortcut created: $script"
else
echo "❌ Failed to create shortcut for $script"
fi
else
echo "❌ Script not found: $script"
fi
done
echo ""
echo "Shortcuts created on Desktop:"
echo " - launch_mushlog.sh"
echo " - launch_mushview.sh"
echo " - launch_import_tool.sh"
echo ""
echo "Note: These are symbolic links. To set custom icons, use the prompt-based AppleScript."