lib/codelation/development/dot_files.rb in codelation-cli-0.0.23 vs lib/codelation/development/dot_files.rb in codelation-cli-0.0.24
- old
+ new
@@ -6,10 +6,12 @@
private
# Install dot files and load them into ~/.bash_profile
def install_dot_files
# Create the directory ~/.codelation/bash if it doesn't exist
- FileUtils.mkdir_p(File.expand_path("~/.codelation/bash"))
+ bash_directory = File.expand_path("~/.codelation/bash")
+ FileUtils.rm_rf(bash_directory) if Dir.exist?(bash_directory)
+ FileUtils.mkdir_p(bash_directory)
# Copy dot files to ~/.codelation
copy_file "dot_files/.codelation.bash", "~/.codelation/bash/.codelation.bash"
copy_file "dot_files/.git-completion.bash", "~/.codelation/bash/.git-completion.bash"
copy_file "dot_files/.git-prompt.sh", "~/.codelation/bash/.git-prompt.sh"