Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

keycastr: added addloginitem

  • Loading branch information...
commit d86354429ea8236f18d85f437db143f6e06338d4 1 parent 545d8cc
Brian Cunnie authored
Showing with 18 additions and 7 deletions.
  1. +18 −7 recipes/keycastr.rb
View
25 recipes/keycastr.rb
@@ -1,7 +1,18 @@
-pivotal_workstation_package "KeyCastr" do
- dmg_name "KeyCastr"
- source "http://software-files-a.cnet.com/s/software/11/00/84/53/keycastr_0.8.0.dmg"
- checksum "ecf59a2e46a8ca450c12f426a4d41000de1c3010a5c46fe12f23fdc647f3f1e7"
- owner WS_USER
- action :install
-end
+include_recipe "pivotal_workstation::addloginitem"
+
+app_path="/Applications/KeyCastr.app"
+
+unless File.exists?(app_path)
+ pivotal_workstation_package "KeyCastr" do
+ dmg_name "KeyCastr"
+ source "http://software-files-a.cnet.com/s/software/11/00/84/53/keycastr_0.8.0.dmg"
+ checksum "ecf59a2e46a8ca450c12f426a4d41000de1c3010a5c46fe12f23fdc647f3f1e7"
+ owner WS_USER
+ action :install
+ end
+
+ # start up on login
+ execute "Start KeyCastr #{app_path} on login" do
+ command "su #{WS_USER} -c \"addloginitem #{app_path}\""
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.