diff --git a/linker b/dotlinker similarity index 90% rename from linker rename to dotlinker index 5cd0feb..146d248 100755 --- a/linker +++ b/dotlinker @@ -1,12 +1,15 @@ #!/usr/bin/env ruby -require 'pp' -require 'docopt' +#/ Usage: dotlinker +#/ +#/ list List files to link +#/ update Update dotfiles repo +#/ symlink Symlink all files +#/ unsymlink Unsymlink all files + require 'pathname' require 'fileutils' -VERSION = '0.0.1' - module ShellHelpers extend self @@ -26,6 +29,10 @@ module ShellHelpers "\033[0;#{COLOR_CODES[color] + 30}m#{str}\033[0m" end + def say_help + exec "grep ^#/<'#{__FILE__}'|cut -c4-" + end + def say(message, color = :default) $stdout.print(colorify_string(message, color)) $stdout.flush @@ -154,6 +161,7 @@ class Linker include FileHelpers include ShellHelpers + VERSION = '0.1.0'.freeze LINKDIR_FILENAME = '.linkdir'.freeze def git_dir @@ -209,35 +217,24 @@ class Linker end end -doc = < e - puts e.message end