Adding a docs dir collexting README and licenses from contained gems. git gems, which bundler does not handle well today, are handled by a hacked parsing of Gemfile.log, gem built into the source bundle and installed on target system
40 lines
889 B
Bash
Executable file
40 lines
889 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test "$(perl -e 'print $>')" = "0" || {
|
|
echo "You need to be root to do this, giving up"
|
|
exit 2
|
|
}
|
|
|
|
test $# = "1" || {
|
|
echo "Usage: diaspora-bundle-install <diaspora-bundle-VERSION-RELEASE.tar.gz>"
|
|
exit 1
|
|
}
|
|
|
|
test -r "$1" || {
|
|
echo "Cannot open $1"
|
|
exit 2
|
|
}
|
|
|
|
rm -rf /usr/lib/diaspora-bundle
|
|
tar xzf $1 -C /usr/lib
|
|
|
|
cd /usr/lib
|
|
mv $(basename $1 .tar.gz) diaspora-bundle
|
|
|
|
mkdir -p /usr/share/doc/diaspora-bundle || :
|
|
cd /usr/lib/diaspora-bundle
|
|
cp -a AUTHORS GNU-AGPL-3.0 COPYRIGHT Gemfile Gemfile.lock \
|
|
/usr/share/doc/diaspora-bundle
|
|
cp -ar docs /usr/share/doc/diaspora-bundle
|
|
|
|
bundle install --local --deployment --without ri rdoc
|
|
for gem in vendor/git/*; do
|
|
gem install --local \
|
|
--force \
|
|
--no-rdoc \
|
|
--no-ri \
|
|
--install-dir vendor/bundle/ruby/1.8/bundler \
|
|
$gem
|
|
done
|
|
|
|
|