Sha256: e0147299907241156a851e5aec236d97f55610ef7b729ed6e6bf9cc710c02bcd
Contents?: true
Size: 742 Bytes
Versions: 4
Compression:
Stored size: 742 Bytes
Contents
#!/usr/bin/env ruby require 'digest/md5' unless %w{preview delivery}.include? ARGV.first puts "\e[31mPlease pass \"preview\" or \"delivery\" as the first argument.\e[0m" exit end project_name = Dir.pwd.split('/').last digest = Digest::MD5.hexdigest project_name origin = "#{ARGV.first}#{ARGV.first == 'preview' ? '/*' : '.zip'}" destination = "#{ARGV.first}/#{digest}/" `rsync -glpPrtvz #{origin} slicecraft@slicecraft.nl:app/shared/#{destination}` if $? == 0 puts "\e[32mThe #{ARGV.first} was successfully rsync-ed to http://www.slicecraft.nl/#{destination}#{ARGV.first == 'preview' ? 'index.html' : 'delivery.zip'}.\e[0m" else puts "\e[31mSomething went wrong while rsync-ing. Check the output for more information.\e[0m" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
beans-middleman-1.0.14 | bin/mm-rsync |
beans-middleman-1.0.13 | bin/mm-rsync |
beans-middleman-1.0.12 | bin/mm-rsync |
beans-middleman-1.0.11 | bin/mm-rsync |