oliver 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd42d827944f9cac29bc3fd872a8ee866447c786
4
- data.tar.gz: 9ffe23398951b5e07395389947f1f4d05978f612
3
+ metadata.gz: 731fab5602bc228ad13cfd9729ff194b1f4c760d
4
+ data.tar.gz: bd22d9aeea4d7324c0315353e6a550be2673a2a7
5
5
  SHA512:
6
- metadata.gz: e95f6cf1faf0575d83c49160d02cfcaf4a010f21c40b9797c696c82d3452435b76bb1bd8f2ec26f4d668fefc0f7d6d0edbaf41aa580d3e57d45470e06a4c3c0b
7
- data.tar.gz: 9740cb22cd70eaaa547634059e21be565c262f64142bb51ae389b3f2a391e4210e5244dc9cf206facebd933ab8c871907dc8f6f3b0055fd6f38ae35079311528
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
- - "trommel/oliver"
132
- - "istx25/dotfiles"
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 |repo|
6
- %x(git clone git://github.com/#{repo} --quiet)
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
@@ -1,3 +1,3 @@
1
1
  module Oliver
2
- VERSION = "1.1.2"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oliver
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh