diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-09-01 07:28:58 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-09-01 07:28:58 +0200 |
| commit | 8b7b065f7b8e36f7f14e5b73e34856e240b182b3 (patch) | |
| tree | 17ccf27a93f019d8428a90702aa8b7d47d1e59f2 /bin | |
| parent | d54b96d613441f4ac350b10651d4d5d97ab460b8 (diff) | |
| download | dotfiles-8b7b065f7b8e36f7f14e5b73e34856e240b182b3.tar.gz dotfiles-8b7b065f7b8e36f7f14e5b73e34856e240b182b3.zip | |
bin/doctor: Accept a VERBOSE environment variable
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/doctor.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/doctor.rb b/bin/doctor.rb index fc1a25f..fbb8716 100755 --- a/bin/doctor.rb +++ b/bin/doctor.rb @@ -79,11 +79,13 @@ files.each do |f| FileUtils.rm_f(dst) src = File.join(SOURCE, f) + puts dst if ENV['VERBOSE'].to_s == '1' File.symlink(src, dst) end # The global .gitignore needs a rename. dst = File.join(Dir.home, '.gitignore') +puts dst if ENV['VERBOSE'].to_s == '1' FileUtils.rm_f(dst) File.symlink(File.join(SOURCE, '.global.gitignore'), dst) @@ -108,6 +110,7 @@ end # And link the relevant files from 'g'. %w[g.sh gcompletion.sh].each do |file| dst = File.join(Dir.home, ".#{file}") + puts dst if ENV['VERBOSE'].to_s == '1' FileUtils.rm_f(dst) if File.exist?(dst) File.symlink(File.join(src_home, "g/#{file}"), dst) end @@ -126,6 +129,7 @@ end # git-prompt puts ">> downloading git-prompt.sh from git/contrib..." dst = File.join(Dir.home, '.git-prompt.sh') +puts dst if ENV['VERBOSE'].to_s == '1' FileUtils.rm_f(dst) if File.exist?(dst) system("curl -o #{dst} https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh") puts '' |
