GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Some Ruby Tools to work on Amazon S3 and EC2, such as buckets list, creation, mysql backup to S3, cron jobs, and Gentoo specific little hacks... ;)
Clone URL: git://github.com/fred/amazon_ruby_tools.git
portage updates
fred (author)
Fri May 02 02:47:46 -0700 2008
commit  1debe8e87ba7a9e775703bb83bb9f325c030e306
tree    742b29eb793515f88453ab911baf288b93937327
parent  424593a829ee54ce732f4b9182e38597426832bb
...
34
35
36
37
38
39
40
 
41
42
43
44
45
46
47
 
48
49
50
...
34
35
36
 
 
 
 
37
38
39
40
41
 
 
 
42
43
44
45
0
@@ -34,17 +34,12 @@ def untar_portage
0
   FileUtils.rm("/mnt/gentoo/portage", :force => true)
0
   puts "Starting to untar file to local portage. Wait 2 minutes"
0
   puts "cd /mnt/gentoo/ && tar -xzpf #{@local_portage}"
0
- Thread.new do
0
- IO.popen("cd /mnt/gentoo/ && rm -rf portage && tar -xzpf #{@local_portage}")
0
- end
0
- sleep 120
0
+ IO.popen("cd /mnt/gentoo/ && rm -rf portage && tar -xzpf #{@local_portage}")
0
 end
0
 
0
 def update_portage
0
   puts "Updating portage via EIX"
0
- Thread.new do
0
- IO.popen("eix-sync")
0
- end
0
+ IO.popen("eix-sync")
0
 end
0
 
0
 download_portage
...
22
23
24
25
26
27
28
 
29
30
31
...
61
62
63
64
65
66
 
67
68
69
...
110
111
112
113
 
...
22
23
24
 
 
 
 
25
26
27
28
...
58
59
60
 
 
 
61
62
63
64
...
105
106
107
 
108
0
@@ -22,10 +22,7 @@ require 'aws/s3'
0
 def update_portage
0
   puts "Updating portage via EIX"
0
   puts "Wait 2 minutes"
0
- Thread.new do
0
- IO.popen("eix-sync")
0
- end
0
- sleep 120
0
+ IO.popen("eix-sync")
0
 end
0
 
0
 # Function to stablish connection
0
@@ -61,9 +58,7 @@ end
0
 def tar_portage
0
   puts "Starting to make tar file of local portage. Wait 2 minutes"
0
   puts "cd /mnt/gentoo/ && rm -rf #{@local_portage} && tar -czpf #{@local_portage} portage"
0
- Thread.new do
0
- IO.popen("cd /mnt/gentoo/ && rm -rf #{@local_portage} && tar -czpf #{@local_portage} portage")
0
- end
0
+ IO.popen("cd /mnt/gentoo/ && rm -rf #{@local_portage} && tar -czpf #{@local_portage} portage")
0
   sleep 120
0
 end
0
 
0
@@ -110,4 +105,4 @@ end
0
 stablish_connection
0
 find_or_create_bucket
0
 tar_portage
0
-send_data
0
+#send_data

Comments

    No one has commented yet.