clear
echo "Before:"
echo "Gem actionmailer-4.2.0"
echo "actionpack (= 4.2.0)"
echo "actionview (= 4.2.0)"
echo "activejob (= 4.2.0)"
echo "mail (>= 2.5.4, ~> 2.5)"
echo "rails-dom-testing (>= 1.0.5, ~> 1.0)"
gem dependency > dependsgem.txt
echo '(F/.M/d h)' | sed 's/(.*)//' dependsgem.txt > dependsgem1.txt
sed -e '/^[A-Z]/d' dependsgem1.txt > dependsgem2.txt
sed -e 's/^[ \t]*//' dependsgem2.txt > dependsgem3.txt
sed '/^$/d' dependsgem3.txt > dependsgem4.txt
sudo perl -lane 'print "@F" if @F = grep !$seen{$_}++, @F' < dependsgem4.txt > dependsgem5.txt
ls -1 | awk 'ORS=" "' dependsgem5.txt > dependsgem6.txt
fold -s dependsgem6.txt > dependsgem7.txt
while read LINE;do LARGE="sudo gem install $LINE";echo $LARGE>>dependsgem.sh;done<dependsgem7.txt
clear
echo "Make so .sh can run"
sudo chmod u+x dependsgem.sh
echo "Clean - delete *.txt files"
sudo rm dependsgem1.txt && rm dependsgem2.txt && rm dependsgem3.txt && rm dependsgem4.txt
sudo rm dependsgem5.txt && rm dependsgem6.txt && dependsgem7.txt
echo "dependsgem.sh created"
echo "sudo ./dependsgem.sh to run"
echo "After:"
echo "sudo gem install rake hoe actionpack actionview activejob mail rails-dom-testing activemodel"
echo "sudo gem install activesupport rack rack-test rails-html-sanitizer builder erubis globalid arel"
echo "sudo gem install i18n json minitest thread_safe tzinfo launchy rspec rspec-its ansi detroit qed"
echo "sudo gem install ae ergo indexer lemon mast bundler thor rdoc cabin bcat childprocess cucumber"
echo "sudo gem install cucumber-pro fuubar kramdown rspec-expectations rubocop coderay haml nokogiri"
Inga kommentarer:
Skicka en kommentar