Created
September 4, 2010 21:45
-
-
Save etozzato/565518 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| apps = %w(my-audi my-bmw my-ferrari my-ford my-jeep my-landrover my-toyota my-volvo myacura mycadillac mychevrolet mychrysler mydodge mygmc myhonda myhummer myjaguar mylexus mylotus mymaserati mymazda mymercedes-benz mymini mymitsubishi mynissan myporsche myrover mysaab mysmart mysubaru myvolkswagen) | |
| if File.exist?('/home/etozzato/my/logs/feed.id') | |
| feed_id = File.read('/home/etozzato/my/logs/feed.id').to_i | |
| `echo '#{feed_id + 1}' > /home/etozzato/my/logs/feed.id` | |
| if feed_id > webs.size-1 | |
| feed_id = 0 | |
| `echo '#{feed_id + 1}' > /home/etozzato/my/logs/feed.id` | |
| end | |
| else | |
| feed_id = 0 | |
| `echo '#{feed_id + 1}' > /home/etozzato/my/logs/feed.id` | |
| end | |
| puts `export RAILS_ENV=production && cd /home/etozzato/my/#{apps[feed_id]}.us && rake update_feeds` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment