#!/usr/bin/env perl # # vim: set ts=4:noet # # sbosnap # script to pull down / update a local copy of the slackbuilds.org tree. # # authors: Jacob Pipkin # Luke Williams # license: WTFPL use 5.16.0; use strict; use warnings FATAL => 'all'; use SBO::Lib; use File::Basename; use Getopt::Long; my $sbo_home = $config{SBO_HOME}; my $self = basename ($0); sub show_usage () { print < \$help, 'version|v' => \$vers); show_usage and exit 0 if $help; show_version and exit 0 if $vers; # check for a command and, if found, execute it my $command; if ($ARGV[0] =~ /fetch|update/) { $command = $ARGV[0]; } else { show_usage and exit 1; } given ($command) { when ('fetch') {fetch_tree} when ('update') {update_tree} } exit 0;