Created
January 4, 2016 14:46
-
-
Save iffyuva/f84970b7cd4cbf1467ce to your computer and use it in GitHub Desktop.
This file contains 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/env ruby | |
# | |
# link <src> --to <dest> | |
require 'optparse' | |
options = {} | |
parser = OptionParser.new do |opts| | |
opts.on('--to n') { |v| options[:to] = v } | |
end | |
# i know modifying ARGV is bad! | |
src = ARGV.shift | |
parser.parse! | |
dest = options[:to] | |
`ln -s #{src} #{dest}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment