-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
executable file
·34 lines (27 loc) · 1.05 KB
/
setup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /usr/bin/env ruby
require_relative 'environment'
module Bootstrap
class Setup < Thor
desc 'all', 'Setup everything'
def all
puts "-> Bootstraping development environment"
puts ""
invoke :dotfiles
invoke :packages
invoke :applications
invoke :configs
puts ""
puts "-> Done. Don't forget to `reload` the shell to apply changes!"
end
register(Bootstrap::Dotfiles, "dotfiles", "dotfiles", "Links dotfiles to your home directory")
register(Bootstrap::Packages, "packages", "packages", "Installs applications from official repository")
register(Bootstrap::Applications, "applications", "applications", "Installs applications using custom scripts")
register(Bootstrap::Configs, "configs", "configs", "Links application config files to ~/.config folder")
end
end
# Little trick to prompt the user for sudo
# to cache the authentication so we don't
# need to prompt the password in the middle
# of execution and mess up the pretty output
system("sudo env 1> /dev/null")
Bootstrap::Setup.start