Module: Backup::Environment::UnixConfiguration::Helpers
- Defined in:
- lib/backup/environment/unix_configuration.rb
Instance Method Summary collapse
Instance Method Details
#confirm_configuration_file_existence ⇒ Object
80 81 82 83 84 85 86 87 |
# File 'lib/backup/environment/unix_configuration.rb', line 80 def confirm_configuration_file_existence unless File.exist?(File.join(BACKUP_PATH, 'config', 'backup.rb')) puts "\nBackup could not find the Backup Configuration File." puts "Did you set up Backup? Do so if you haven't yet:" puts "\nbackup --setup\n " exit end end |
#sudo ⇒ Object
89 90 91 92 93 94 95 |
# File 'lib/backup/environment/unix_configuration.rb', line 89 def sudo if writable?(BACKUP_PATH) "" else "sudo" end end |