dorian-dot 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dot +10 -11
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 516009c7030eabc74e5027d4efb78f5156e022adfe6e8c9466bd5a87bc5aa3ec
|
4
|
+
data.tar.gz: 463f3c351fea361c17b64da52b3d58ac528c5800fab9d297af6bd858d5a6df01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1e7359918da3ab54594a5aa91622cb99bb27d63417c917a0b0075a96eedbdf65ab5458920fdabbfc0556f18c83124a531b84940e1155bc2d9b791a34caddc5f
|
7
|
+
data.tar.gz: 84148ac9561f2fd25f105ba291a99de58b7109e73fb26f29d393b29320d191e2a99b6204aa80643331bc77287f0852b88b5a2b6f1a666e05c4d9b41d3ea85256
|
data/bin/dot
CHANGED
@@ -2,20 +2,19 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
require "fileutils"
|
5
|
+
require "git"
|
5
6
|
|
6
7
|
if ARGV.size != 1
|
7
8
|
puts "USAGE: dot DIRECTORY"
|
8
9
|
exit
|
9
10
|
end
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
FileUtils.ln_s(File.expand_path(file), homefile, verbose: true)
|
21
|
-
end
|
12
|
+
Git
|
13
|
+
.open(ARGV.first)
|
14
|
+
.ls_files
|
15
|
+
.map(&:first)
|
16
|
+
.each do |file|
|
17
|
+
homefile = "#{Dir.home}/#{file}"
|
18
|
+
File.delete(homefile) if File.exist?(homefile) || File.symlink?(homefile)
|
19
|
+
FileUtils.ln_s(File.expand_path(file), homefile, verbose: true)
|
20
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dorian-dot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
12
|
-
dependencies:
|
11
|
+
date: 2024-02-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: git
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1'
|
13
27
|
description: |-
|
14
28
|
Links dot files e.g. `dot ~/src/dotfiles`
|
15
29
|
|