Skip to content

Commit

Permalink
Automatically install Perl modules with cpanm
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa committed Apr 22, 2012
1 parent 7366181 commit 49368b6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ root-setup:
@perl -M5.10.0 -e1 > /dev/null || (echo " *** Need perl 5.10 or higher" && exit 1)
# unison
@which unison > /dev/null || (echo " *** Need unison, try installing unison package" && exit 1)
# XXX perl modules
@echo "The system has davfs2, perl 5.10 and unison, good."

@if which curl > /dev/null; then \
curl -L http://cpanmin.us | perl - --self-upgrade; \
cpanm uni::perl autodie Config::Tiny AnyEvent::Inotify::Simple EV AnyEvent::XMPP Linux::Proc::Mounts; \
echo "Installed Perl dependencies."; \
else \
echo " *** No curl found, install needed Perl pachages manually "; \
fi

@test `id -u` -eq 0 || (echo " *** Need to run 'make root-setup' as root with sudo" && exit 1)
@echo "https://webdav.yandex.ru ${DAVFS_MP} davfs noauto,user 0 0" >> /etc/fstab
Expand Down

0 comments on commit 49368b6

Please sign in to comment.