update_cadabra 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/update_cadabra +79 -0
- metadata +61 -0
data/bin/update_cadabra
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# update cadabra!
|
4
|
+
# auto-update rvm( + rubygems & gems), rubygems (+ gems), macports (+ ports), homebrew formulas, textmate bundles -- pain-free!
|
5
|
+
# IMPORTANT: don't forget to run chmod u+x in this file before execute
|
6
|
+
|
7
|
+
if [ "$(whoami)" = 'root' ]; then
|
8
|
+
echo "Ooops! Don't run this script with sudo (some tools may need your enviroment variables to be correctly updated)"
|
9
|
+
exit 1
|
10
|
+
fi
|
11
|
+
|
12
|
+
sudo echo "update cadabra starting ... " # just to get sudo access and don't bother you later :)
|
13
|
+
|
14
|
+
# find the dir of this script
|
15
|
+
SCRIPT_PATH="${BASH_SOURCE[0]}";
|
16
|
+
if([ -h "${SCRIPT_PATH}" ]) then
|
17
|
+
while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
|
18
|
+
fi
|
19
|
+
pushd . > /dev/null
|
20
|
+
cd `dirname ${SCRIPT_PATH}` > /dev/null
|
21
|
+
SCRIPT_PATH=`pwd`;
|
22
|
+
|
23
|
+
#cd $SCRIPT_PATH
|
24
|
+
#echo "==> trying to self-update :)"
|
25
|
+
#git pull -q
|
26
|
+
|
27
|
+
if which -s port
|
28
|
+
then
|
29
|
+
echo "==> update macports, ports, clean outdated ports and uninstall inactive ports"
|
30
|
+
sudo -E port -q selfupdate
|
31
|
+
sudo -E port -q -d sync > /dev/null
|
32
|
+
sudo -E port -u -q upgrade installed
|
33
|
+
#sudo -E port -f uninstall inactive (-u option in the previous line do this)
|
34
|
+
#sudo -E port clean --all installed - this isn't enough?
|
35
|
+
sudo -E port -f -p -q clean --all installed
|
36
|
+
rm -rf PortIndex PortIndex.quick
|
37
|
+
fi
|
38
|
+
|
39
|
+
if which -s brew
|
40
|
+
then
|
41
|
+
echo "==> update homebrew formulas"
|
42
|
+
brew update > /dev/null
|
43
|
+
fi
|
44
|
+
|
45
|
+
if which -s gem
|
46
|
+
then
|
47
|
+
echo "==> update rubygems and update the gems"
|
48
|
+
gem update -q --system > /dev/null
|
49
|
+
gem update -q > /dev/null
|
50
|
+
gem cleanup -q
|
51
|
+
fi
|
52
|
+
|
53
|
+
if which -s rvm
|
54
|
+
then
|
55
|
+
echo "==> update rvm, rubygems and update the gems"
|
56
|
+
rvm update > /dev/null
|
57
|
+
rvm reload > /dev/null
|
58
|
+
rvm gem update -q --system > /dev/null
|
59
|
+
rvm gem update -q > /dev/null
|
60
|
+
rvm gem cleanup -q
|
61
|
+
fi
|
62
|
+
|
63
|
+
if [ -d ~/Library/Application\ Support/TextMate/Bundles ]
|
64
|
+
then
|
65
|
+
echo "==> update textmate bundles"
|
66
|
+
cd ~/Library/Application\ Support/TextMate/Bundles
|
67
|
+
ls | while read bundle; do
|
68
|
+
if [ -d "${bundle}/.git" ]
|
69
|
+
then
|
70
|
+
echo " > ${bundle}"
|
71
|
+
cd "${bundle}"
|
72
|
+
# git doesnt allow me to do a git pull outside the dir (or the man page is a huge #fail)
|
73
|
+
git pull -q
|
74
|
+
cd ..
|
75
|
+
fi
|
76
|
+
done
|
77
|
+
fi
|
78
|
+
|
79
|
+
popd > /dev/null
|
metadata
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: update_cadabra
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 0
|
8
|
+
version: "1.0"
|
9
|
+
platform: ruby
|
10
|
+
authors:
|
11
|
+
- Diego Plentz
|
12
|
+
autorequire:
|
13
|
+
bindir: bin
|
14
|
+
cert_chain: []
|
15
|
+
|
16
|
+
date: 2010-05-06 00:00:00 -03:00
|
17
|
+
default_executable:
|
18
|
+
dependencies: []
|
19
|
+
|
20
|
+
description: auto-update rvm( + rubygems & gems), rubygems (+ gems), macports (+ ports), homebrew formulas, textmate bundles -- pain-free!
|
21
|
+
email: diego@plentz.org
|
22
|
+
executables:
|
23
|
+
- update_cadabra
|
24
|
+
extensions: []
|
25
|
+
|
26
|
+
extra_rdoc_files: []
|
27
|
+
|
28
|
+
files: []
|
29
|
+
|
30
|
+
has_rdoc: true
|
31
|
+
homepage: http://github.com/plentz/update_cadabra
|
32
|
+
licenses: []
|
33
|
+
|
34
|
+
post_install_message:
|
35
|
+
rdoc_options: []
|
36
|
+
|
37
|
+
require_paths:
|
38
|
+
- lib
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
segments:
|
51
|
+
- 0
|
52
|
+
version: "0"
|
53
|
+
requirements: []
|
54
|
+
|
55
|
+
rubyforge_project:
|
56
|
+
rubygems_version: 1.3.6
|
57
|
+
signing_key:
|
58
|
+
specification_version: 3
|
59
|
+
summary: auto-update rvm( + rubygems & gems), rubygems (+ gems), macports (+ ports), homebrew formulas, textmate bundles -- pain-free!
|
60
|
+
test_files: []
|
61
|
+
|