-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile
168 lines (152 loc) · 2.56 KB
/
Rakefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# frozen_string_literal: true
$LOAD_PATH.unshift 'lib'
require 'require'
require 'ci'
Rake.add_rakelib 'lib/tasks'
require 'concurrent'
require 'ansi'
module Rake
class Task
module PATH
def invoke_with_call_chain(_, invocation_chain)
current_path = ENV['PATH']&.split(File::PATH_SEPARATOR)
default_path = Dir.glob('/etc/paths{,.d/*}')
.flat_map { |f| File.read(f).strip.split("\n") }
if File.exist?('/etc/environment') && (path = File.read('/etc/environment')[/PATH=(?:"([^"]+)"|'([^']+)')/, 1])
default_path += path.split(File::PATH_SEPARATOR)
end
if default_path.empty?
default_path = ['/usr/local/bin', '/usr/local/sbin', '/usr/bin', '/usr/sbin', '/bin', '/sbin']
end
ENV['PATH'] = [*current_path, *default_path].uniq.join(File::PATH_SEPARATOR)
super
end
end
prepend PATH
end
end
DOTFILES_DIR = __dir__
ALLOWED_VARIABLES = [
'Apple_PubSub_Socket_Render',
'CI',
'HOME',
'LANG',
'LOGNAME',
*(ENV['CODESPACES'] ? 'PATH' : nil),
'PWD',
'SHELL',
'SHLVL',
'SSH_AUTH_SOCK',
'SUDO_ASKPASS',
'TERM',
'TERM_PROGRAM',
'TERM_PROGRAM_VERSION',
'TERM_SESSION_ID',
'TMPDIR',
'USER',
'XPC_FLAGS',
'XPC_SERVICE_NAME',
'XDG_SESSION_TYPE',
'XDG_SESSION_DESKTOP',
'XDG_CURRENT_DESKTOP',
'DBUS_SESSION_BUS_ADDRESS',
'XDG_RUNTIME_DIR',
].freeze
ENV.delete_if { |k, _|
!ALLOWED_VARIABLES.include?(k)
}
task :linux => [
:files,
:fonts,
:fish,
:git,
:gpg,
:toshy,
:vscode,
:zed,
:z,
]
task :windows => [
:cs2,
]
task :macos => [
:ansible,
:files,
:'xcode:command_line_utilities',
:'softwareupdate:rosetta',
:brew,
:node,
:ruby,
:rust,
:python,
:mas,
:'xcode:accept_license',
:fonts,
:repos,
:mackup,
:local_scripts,
:bash,
:fish,
:fork,
:krew,
:direnv,
:git,
:github,
:gpg,
:cura,
:'xcode:defaults',
:music,
:rapidclick,
:hazel,
:virtualbox,
:element,
:steam,
:mumble,
:teamspeak,
:cs2,
:cities_skylines,
:tex,
:skim,
:ccache,
:sccache,
:make,
:pam,
:keyboard,
:ui,
:monitorcontrol,
:origin,
:rocket,
:safari,
:locale,
:startup,
:transmission,
:locate_db,
:menubar,
:mediathekview,
:deliveries,
:tower,
:bettersnaptool,
:screensaver,
:parallels,
:vagrant,
:telegram,
:finder,
:crash_reporter,
:dnsmasq,
:loginwindow,
:textmate,
:vscode,
:dock,
:softwareupdate,
:terminal,
:rfc,
:x11,
:z,
:keka,
:arduino,
:mouse_trackpad,
:userscripts,
:thangs,
:zed,
:asdf,
]