From 7e0e116d4fc2a3d57e125770266e402f67ee815f Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Sun, 14 Mar 2010 08:31:49 +0200 Subject: Converted bloop to Bash --- bloop.command | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bloop.command (limited to 'bloop.command') 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 +# @author Vesa Viskari +# @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' -- cgit v1.2.3