tmclean 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +9 -6
  2. data/bin/tmclean +5 -5
  3. metadata +2 -2
data/README.md CHANGED
@@ -3,18 +3,18 @@
3
3
  Clean old Time Machine backups with ease! You know, when you have backups from several machines on a single drive and
4
4
  not a single one wants to backup anymore...
5
5
 
6
- TMClean requires root privileges to delete the Time Machine backups.
7
-
8
6
  ## Installation
9
7
 
10
8
  Simply install from [RubyGems](https://rubygems.org/):
11
9
 
12
10
  ```Bash
13
- $ sudo gem install tmclean
11
+ $ gem install tmclean
14
12
  ```
15
13
 
16
14
  ## Usage
17
15
 
16
+ See the usage by just type `tmclean`:
17
+
18
18
  ```Bash
19
19
  $ tmclean ruby-1.9.3-p194 1↵
20
20
  Usage: tmclean last <number>
@@ -22,12 +22,15 @@ Usage: tmclean last <number>
22
22
  tmclean until <date description>
23
23
  ```
24
24
 
25
+ TMClean requires root privileges to delete the Time Machine backups. If you use [RVM](https://rvm.io/),
26
+ then you simply can use `rvmsudo`, otherwise use `sudo su -`.
27
+
25
28
  ### Last
26
29
 
27
30
  You can say how many backups you want to remove from Time Machine:
28
31
 
29
32
  ```Bash
30
- $ sudo tmclean last 2
33
+ $ rvmsudo tmclean last 2
31
34
  Getting the list of backups. Hold on a moment...
32
35
 
33
36
  Keep 53 recent backups.
@@ -51,7 +54,7 @@ Done.
51
54
  You can say how many backups you want to keep, the rest is removed from Time Machine:
52
55
 
53
56
  ```Bash
54
- $ sudo tmclean keep 50
57
+ $ rvmsudo tmclean keep 50
55
58
  Getting the list of backups. Hold on a moment...
56
59
 
57
60
  Keep 50 recent backups.
@@ -77,7 +80,7 @@ Done.
77
80
  You can say which date the backups should be removed from Time Machine:
78
81
 
79
82
  ```Bash
80
- $ sudo tmclean until 3 months ago
83
+ $ rvmsudo tmclean until 3 months ago
81
84
  Getting the list of backups. Hold on a moment...
82
85
 
83
86
  Keep 36 recent backups.
data/bin/tmclean CHANGED
@@ -43,7 +43,7 @@ end
43
43
 
44
44
  def perform(backups)
45
45
  puts ''
46
- puts 'Deleting backups. You may want to grab some coffees, I\'ll take ages...'
46
+ puts 'Deleting backups. You may want to grab some coffee, it takes ages...'
47
47
  puts ''
48
48
 
49
49
  backups.each do |backup|
@@ -55,10 +55,10 @@ def perform(backups)
55
55
  puts 'Done.'
56
56
  end
57
57
 
58
- #unless ENV['USER'] == 'root'
59
- # puts 'Time Machine clean requires root privileges.'
60
- # exit 2
61
- #end
58
+ unless ENV['USER'] == 'root'
59
+ puts 'Time Machine clean requires root privileges.'
60
+ exit 2
61
+ end
62
62
 
63
63
  unless system('hash', 'tmutil')
64
64
  puts 'The Time Machine command line utility `tmutil` was not found.'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmclean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -84,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  segments:
86
86
  - 0
87
- hash: 4304163877546570679
87
+ hash: 1423057322859736544
88
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements: