aboutsummaryrefslogtreecommitdiffstats
path: root/bloop.command
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-03-14 08:31:49 +0200
committerFilipp Lepalaan <filipp@mac.com>2010-03-14 08:31:49 +0200
commit7e0e116d4fc2a3d57e125770266e402f67ee815f (patch)
tree4921e673518630a91b6bbee0a8bb1f2da29bc261 /bloop.command
parent75e8f5f66e32aecf06e8817c2c91c9da543e87a5 (diff)
downloadmtk-7e0e116d4fc2a3d57e125770266e402f67ee815f.tar.gz
mtk-7e0e116d4fc2a3d57e125770266e402f67ee815f.tar.bz2
mtk-7e0e116d4fc2a3d57e125770266e402f67ee815f.zip
Converted bloop to Bash
Diffstat (limited to 'bloop.command')
-rw-r--r--bloop.command28
1 files changed, 28 insertions, 0 deletions
diff --git a/bloop.command b/bloop.command
new file mode 100644
index 0000000..67b292a
--- /dev/null
+++ b/bloop.command
@@ -0,0 +1,28 @@
+#! /usr/bin/env bash
+# blooper.command
+# Launch applications and reboot the machine
+# @author Filipp Lepalaan <filipp@mcare.fi>
+# @author Vesa Viskari <vesa@mcare.fi>
+# @copyright (c) 2010 Filipp Lepalaan
+
+MYDIR="~/Desktop/BlooperApps"
+
+# Check if Login Item is set
+defaults read com.apple.loginitems | grep -c "Path: $($0)"
+
+if [[ ! -d "$MYDIR" ]]; then
+ mkdir "$MYDIR"
+ ln -s /Applications/Utilities/Grapher.app "$MYDIR/Grapher.app"
+ ln -s /Applications/Utilities/Activity\ Monitor.app "$MYDIR/Activity Monitor.app"
+ ln -s /Applications/Utilities/Console.app "$MYDIR/Console.app"
+ ln -s /Applications/iTunes.app "$MYDIR/iTunes.app"
+fi
+
+find "$MYDIR/" -exec open {} \;
+trap "killall yes; rm ${MYDIR}; echo 'Cleaning up...'; exit 255" SIGINT
+sleep 10
+
+echo $(date) >> ~/Desktop/blooper.log
+
+#reboot
+osascript -e 'tell application "Finder" to restart'