oliver 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/oliver/main.rb +20 -2
- data/lib/oliver/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 731fab5602bc228ad13cfd9729ff194b1f4c760d
|
4
|
+
data.tar.gz: bd22d9aeea4d7324c0315353e6a550be2673a2a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a884915562c04cf1507e9d4ba4ced0b2f7052ca4998b02ac1ce55c169857da02fcddc5473ca85be78189f3b96899207ed362412c85b38c7d81792d0418083f3
|
7
|
+
data.tar.gz: e0cd80e2966403acfb3f64dc882fcf3901d4f179d1a27e858a2d63bfe9b53055d4030190443df286f7810f6008573a179b1bf9d718b718c9b2f6eaee9d561b9a
|
data/README.md
CHANGED
@@ -128,8 +128,12 @@ and in the `Olivefile`
|
|
128
128
|
|
129
129
|
```vim
|
130
130
|
repos:
|
131
|
-
|
132
|
-
|
131
|
+
- "trommel/oliver"
|
132
|
+
- "istx25/dotfiles"
|
133
|
+
|
134
|
+
# use 3 spaces for indentation, not tabs!
|
135
|
+
# I spent, like, an hour trying to fix a nonexistant bug becuase of this
|
136
|
+
# smh so hard
|
133
137
|
```
|
134
138
|
|
135
139
|
you can then run
|
data/lib/oliver/main.rb
CHANGED
@@ -1,8 +1,26 @@
|
|
1
1
|
# Main oliver file
|
2
2
|
def run_main
|
3
|
+
|
4
|
+
# Back up your files, man
|
5
|
+
if ! File.directory?('backup')
|
6
|
+
Dir.mkdir 'backup'
|
7
|
+
end
|
8
|
+
|
9
|
+
# The buggiest code in the world (that's probably totally untrue)
|
3
10
|
body = File.read(Name::OLIVER.chomp)
|
4
11
|
final = YAML.load("---\n#{body}\n---")
|
5
|
-
final["repos"].each do |
|
6
|
-
|
12
|
+
final["repos"].each do |url|
|
13
|
+
|
14
|
+
# Split the url in half
|
15
|
+
splitted = url.split '/'
|
16
|
+
username = splitted[0]
|
17
|
+
repo = splitted[1]
|
18
|
+
|
19
|
+
if ! File.directory?(repo)
|
20
|
+
%x(git clone git://github.com/#{url} --quiet)
|
21
|
+
else
|
22
|
+
puts "#{Rainbow(repo).red}/ already exists."
|
23
|
+
end
|
24
|
+
|
7
25
|
end
|
8
26
|
end
|
data/lib/oliver/version.rb
CHANGED