vagrant-export 0.2.5 → 0.2.6
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/lib/vagrant-export/command.rb +1 -1
- data/lib/vagrant-export/exporter.rb +4 -2
- data/lib/vagrant-export/version.rb +1 -1
- data/res/cleanup.sh +16 -13
- data/vagrant-export.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad8591a411d7650974b2b60cd9aa74c300216512
|
4
|
+
data.tar.gz: c49fe40935f20ccb07418c6ec9db912eb2cc02aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d46c1d18737b87a1c5ad644ed482c81e9876cc2391f421bec5376e832dad5e9414e6cde57012945efe075a2eb3e4777df56ea8945ebf9a9698a860aa31460c8b
|
7
|
+
data.tar.gz: a0a2c43e7f4222c1c4a72af42993920cc8aa5f3cb4eb1f7b24494b88ada0c35b27206f17a59e7bd8019d1133f7a147375d56f5d140a86935f0287ac8e42294c6
|
@@ -147,7 +147,7 @@ module VagrantPlugins
|
|
147
147
|
}
|
148
148
|
end
|
149
149
|
|
150
|
-
#
|
150
|
+
# If it has one, just copy it
|
151
151
|
if vagrantfile_has_mac
|
152
152
|
FileUtils.cp(original_vagrantfile, File.join(@tmp_path, 'Vagrantfile'))
|
153
153
|
|
@@ -162,6 +162,8 @@ module VagrantPlugins
|
|
162
162
|
}))
|
163
163
|
end
|
164
164
|
|
165
|
+
# If there is a Vagrantfile, but without a mac
|
166
|
+
# ensure it is included
|
165
167
|
if vagrantfile_exists
|
166
168
|
FileUtils.mkdir_p(target_include_path) unless Dir.exist?(target_include_path)
|
167
169
|
FileUtils.cp(original_vagrantfile, File.join(target_include_path, '_Vagrantfile'))
|
@@ -172,7 +174,7 @@ module VagrantPlugins
|
|
172
174
|
@box_file_name = @tmp_path + '.box'
|
173
175
|
|
174
176
|
Vagrant::Util::SafeChdir.safe_chdir(@tmp_path) do
|
175
|
-
files = Dir.glob
|
177
|
+
files = Dir.glob(File.join('.', '**', '*'))
|
176
178
|
Vagrant::Util::Subprocess.execute('bsdtar', '-czf', @box_file_name, *files)
|
177
179
|
end
|
178
180
|
|
data/res/cleanup.sh
CHANGED
@@ -7,23 +7,22 @@ for DB in ${DBS}
|
|
7
7
|
do
|
8
8
|
echo 'SHOW TABLES;' | \
|
9
9
|
mysql -u root $DB | \
|
10
|
-
egrep '^cf_|^index_|^tx_realurl|sys_log|sys_history|dataflow_batch_export|dataflow_batch_import|log_customer|log_quote|log_summary|log_summary_type|log_url|log_url_info|log_visitor|log_visitor_info|log_visitor_online|report_viewed_product_index|report_compared_product_index|report_event|index_event|catalog_compare_item' | \
|
10
|
+
egrep '^cf_|^cache_|^cachingframework_|^index_|^tx_realurl|sys_log|sys_history|dataflow_batch_export|dataflow_batch_import|log_customer|log_quote|log_summary|log_summary_type|log_url|log_url_info|log_visitor|log_visitor_info|log_visitor_online|report_viewed_product_index|report_compared_product_index|report_event|index_event|catalog_compare_item' | \
|
11
11
|
egrep -v 'index_stat|index_conf|realurl_redirect' | \
|
12
12
|
awk '{print "TRUNCATE "$1";"}' | \
|
13
13
|
mysql -u root $DB
|
14
|
-
|
15
14
|
done
|
16
15
|
|
17
16
|
echo "Reset vagrant authorized keys file"
|
18
|
-
wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O '/home/vagrant/.ssh/authorized_keys'
|
17
|
+
wget -q --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O '/home/vagrant/.ssh/authorized_keys'
|
19
18
|
|
20
19
|
echo "Removing old kernel packages"
|
21
|
-
apt-get -y --purge remove $(dpkg --list |
|
22
|
-
apt-get -y --purge remove $(dpkg --list | egrep 'linux-(image
|
20
|
+
apt-get -qq -y --purge remove $(dpkg --list | egrep '^rc' | awk '{print $2}')
|
21
|
+
apt-get -qq -y --purge remove $(dpkg --list | egrep 'linux-(image(-extra)?|headers)-[0-9]' | awk '{print $3,$2}' | grep -v $(uname -r | sed -e s/-generic//g) | awk '{ print $2}')
|
23
22
|
|
24
23
|
echo "Cleaning up apt"
|
25
|
-
apt-get -y --purge autoremove
|
26
|
-
apt-get -y clean
|
24
|
+
apt-get -qq -y --purge autoremove
|
25
|
+
apt-get -qq -y clean
|
27
26
|
rm -rf /var/lib/apt/lists/*
|
28
27
|
rm -rf /var/lib/aptitude/*
|
29
28
|
|
@@ -34,18 +33,22 @@ rm -rf $HOME/.npm
|
|
34
33
|
rm -rf $HOME/tmp
|
35
34
|
|
36
35
|
if [[ -d /var/www/typo3temp ]]; then
|
37
|
-
echo "
|
36
|
+
echo "Removing TYPO3 CMS temp files"
|
38
37
|
find /var/www/typo3temp -type f -exec rm -f {} \;
|
39
|
-
find /var/www/typo3temp -type d -iname "_processed_" -exec rm -rf {} \;
|
38
|
+
find /var/www/typo3temp -type d -iname "_processed_" -exec rm -rf {} \; > /dev/null 2>&1
|
39
|
+
|
40
|
+
if [[ -d /var/www/fileadmin/_processed_ ]]; then
|
41
|
+
rm -rf /var/www/fileadmin/_processed_/* > /dev/null 2>&1
|
42
|
+
fi
|
40
43
|
fi
|
41
44
|
|
42
45
|
if [[ -d /var/www/Data/Temporary ]]; then
|
43
|
-
echo "
|
44
|
-
rm -rf /var/www/Data/Temporary/*
|
46
|
+
echo "Removing TYPO3 Flow temp files"
|
47
|
+
rm -rf /var/www/Data/Temporary/* > /dev/null 2>&1
|
45
48
|
fi
|
46
49
|
|
47
50
|
if [[ -d /var/www/var/cache ]]; then
|
48
|
-
echo "
|
51
|
+
echo "Removing Magento temp files"
|
49
52
|
rm -rf /var/www/downloader/.cache/*
|
50
53
|
rm -rf /var/www/downloader/pearlib/cache/*
|
51
54
|
rm -rf /var/www/downloader/pearlib/download/*
|
@@ -58,7 +61,7 @@ if [[ -d /var/www/var/cache ]]; then
|
|
58
61
|
fi
|
59
62
|
|
60
63
|
echo "Zeroing device to make space..."
|
61
|
-
dd if=/dev/zero of=/EMPTY bs=1M
|
64
|
+
dd if=/dev/zero of=/EMPTY bs=1M > /dev/null 2>&1
|
62
65
|
rm -f /EMPTY
|
63
66
|
|
64
67
|
echo "Sync to disc"
|
data/vagrant-export.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |g|
|
|
7
7
|
g.version = VagrantPlugins::Export::VERSION
|
8
8
|
g.platform = Gem::Platform::RUBY
|
9
9
|
g.license = 'MIT'
|
10
|
-
g.authors = 'Georg
|
10
|
+
g.authors = 'Georg Großberger'
|
11
11
|
g.email = 'contact@grossberger-ge.org'
|
12
12
|
g.homepage = 'https://github.com/trenker/vagrant-export'
|
13
13
|
g.summary = 'Export boxes to .box files including the original Vagrantfile and some cleanups inside the VM'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-export
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Georg
|
7
|
+
- Georg Großberger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Export boxes to .box files including the original Vagrantfile and some
|
14
14
|
cleanups inside the VM
|
@@ -19,7 +19,6 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
21
|
- Gemfile
|
22
|
-
- Gemfile.lock
|
23
22
|
- README.md
|
24
23
|
- lib/vagrant-export.rb
|
25
24
|
- lib/vagrant-export/command.rb
|