aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SBO-Lib/lib/SBO/Lib.pm2
-rw-r--r--man1/sbocheck.12
-rw-r--r--man1/sbocheck.1.bak~32
-rw-r--r--man1/sboclean.12
-rw-r--r--man1/sboconfig.12
-rw-r--r--man1/sbofind.12
-rw-r--r--man1/sboinstall.12
-rw-r--r--man1/sboremove.12
-rw-r--r--man1/sbosnap.12
-rw-r--r--man1/sboupgrade.12
-rw-r--r--man5/sbotools.conf.52
-rwxr-xr-xtools/update_man_pages.sh135
12 files changed, 177 insertions, 10 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
index 1351b61..ed5f74c 100644
--- a/SBO-Lib/lib/SBO/Lib.pm
+++ b/SBO-Lib/lib/SBO/Lib.pm
@@ -14,7 +14,7 @@ use strict;
use warnings FATAL => 'all';
package SBO::Lib;
-our $VERSION = '1.6';
+our $VERSION = '1.7';
require Exporter;
our @ISA = qw(Exporter);
diff --git a/man1/sbocheck.1 b/man1/sbocheck.1
index ce5c48b..68318c3 100644
--- a/man1/sbocheck.1
+++ b/man1/sbocheck.1
@@ -1,4 +1,4 @@
-.TH sbocheck 1 "Prickle-Prickle, Discord 16, 3179 YOLD" "sbotools 1.6" dawnrazor.net
+.TH sbocheck 1 "Setting Orange, Bureaucracy 46, 3179 YOLD" "sbotools 1.7" dawnrazor.net
.SH NAME
.P
sbocheck - update a local slackbuilds.org tree and check for updates.
diff --git a/man1/sbocheck.1.bak~ b/man1/sbocheck.1.bak~
new file mode 100644
index 0000000..68318c3
--- /dev/null
+++ b/man1/sbocheck.1.bak~
@@ -0,0 +1,32 @@
+.TH sbocheck 1 "Setting Orange, Bureaucracy 46, 3179 YOLD" "sbotools 1.7" dawnrazor.net
+.SH NAME
+.P
+sbocheck - update a local slackbuilds.org tree and check for updates.
+.SH SYNAPSES
+.P
+sbocheck [-h|-v]
+.SH DESCRIPTION
+.P
+sbocheck first updates a previously fetched copy of the slackbuilds.org tree (see sbosnap(1)) and then checks to see if any packages installed from slackbuilds.org have updates, and reports what it finds.
+.SH OPTIONS
+.P
+-h|--help
+.RS
+Show help information.
+.RE
+.P
+-v|--version
+.RS
+Show version information.
+.RE
+.SH BUGS
+.P
+None known, but there may be some. Please report any found to j@dawnrazor.net or xocel@iquidus.org; patches are always welcome.
+.SH SEE ALSO
+.P
+sboclean(1), sboconfig(1), sbofind(1), sboinstall(1), sboremove(1), sbosnap(1), sboupgrade(1), sbotools.conf(5)
+.SH AUTHORS
+.P
+Jacob Pipkin <j@dawnrazor.net>
+.P
+Luke Williams <xocel@iquidus.org>
diff --git a/man1/sboclean.1 b/man1/sboclean.1
index 9a5d11b..73fa6f5 100644
--- a/man1/sboclean.1
+++ b/man1/sboclean.1
@@ -1,4 +1,4 @@
-.TH sboclean 1 "Prickle-Prickle, Discord 16, 3179 YOLD" "sbotools 1.6" dawnrazor.net
+.TH sboclean 1 "Setting Orange, Bureaucracy 46, 3179 YOLD" "sbotools 1.7" dawnrazor.net
.SH NAME
.P
sboclean - clean files left around by sbotools.
diff --git a/man1/sboconfig.1 b/man1/sboconfig.1
index 99c100c..8d988c4 100644
--- a/man1/sboconfig.1
+++ b/man1/sboconfig.1
@@ -1,4 +1,4 @@
-.TH sboconfig 1 "Prickle-Prickle, Discord 16, 3179 YOLD" "sbotools 1.6" dawnrazor.net
+.TH sboconfig 1 "Setting Orange, Bureaucracy 46, 3179 YOLD" "sbotools 1.7" dawnrazor.net
.SH NAME
.P
sboconfig - set sbotools configuration options.
diff --git a/man1/sbofind.1 b/man1/sbofind.1
index f4bfef7..da1c153 100644
--- a/man1/sbofind.1
+++ b/man1/sbofind.1
@@ -1,4 +1,4 @@
-.TH sbofind 1 "Prickle-Prickle, Discord 16, 3179 YOLD" "sbotools 1.6" dawnrazor.net
+.TH sbofind 1 "Setting Orange, Bureaucracy 46, 3179 YOLD" "sbotools 1.7" dawnrazor.net
.SH NAME
.P
sbofind - search slackbuilds.org tree for a given name
diff --git a/man1/sboinstall.1 b/man1/sboinstall.1
index 6c0c262..f7caad8 100644
--- a/man1/sboinstall.1
+++ b/man1/sboinstall.1
@@ -1,4 +1,4 @@
-.TH sboinstall 1 "Prickle-Prickle, Discord 16, 3179 YOLD" "sbotools 1.6" dawnrazor.net
+.TH sboinstall 1 "Setting Orange, Bureaucracy 46, 3179 YOLD" "sbotools 1.7" dawnrazor.net
.SH NAME
.P
sboinstall - install slackbuilds
diff --git a/man1/sboremove.1 b/man1/sboremove.1
index 567e00f..2613f5a 100644
--- a/man1/sboremove.1
+++ b/man1/sboremove.1
@@ -1,4 +1,4 @@
-.TH sboremove 1 "Prickle-Prickle, Discord 16, 3179 YOLD" "sbotools 1.6" dawnrazor.net
+.TH sboremove 1 "Setting Orange, Bureaucracy 46, 3179 YOLD" "sbotools 1.7" dawnrazor.net
.SH NAME
.P
sboremove - remove packages installed from slackbuilds
diff --git a/man1/sbosnap.1 b/man1/sbosnap.1
index 9b11d4b..ed3fc12 100644
--- a/man1/sbosnap.1
+++ b/man1/sbosnap.1
@@ -1,4 +1,4 @@
-.TH sbosnap 1 "Prickle-Prickle, Discord 16, 3179 YOLD" "sbotools 1.6" dawnrazor.net
+.TH sbosnap 1 "Setting Orange, Bureaucracy 46, 3179 YOLD" "sbotools 1.7" dawnrazor.net
.SH NAME
.P
sbosnap - slackbuilds.org tree fetch and update command.
diff --git a/man1/sboupgrade.1 b/man1/sboupgrade.1
index cecea62..2b24be6 100644
--- a/man1/sboupgrade.1
+++ b/man1/sboupgrade.1
@@ -1,4 +1,4 @@
-.TH sboupgrade 1 "Prickle-Prickle, Discord 16, 3179 YOLD" "sbotools 1.6" dawnrazor.net
+.TH sboupgrade 1 "Setting Orange, Bureaucracy 46, 3179 YOLD" "sbotools 1.7" dawnrazor.net
.SH NAME
.P
sboupgrade - install or upgrade slackbuilds
diff --git a/man5/sbotools.conf.5 b/man5/sbotools.conf.5
index 46a703d..4325a36 100644
--- a/man5/sbotools.conf.5
+++ b/man5/sbotools.conf.5
@@ -1,4 +1,4 @@
-.TH sbotools.conf 5 "Prickle-Prickle, Discord 16, 3179 YOLD" "sbotools 1.6" dawnrazor.net
+.TH sbotools.conf 5 "Setting Orange, Bureaucracy 46, 3179 YOLD" "sbotools 1.7" dawnrazor.net
.SH NAME
.P
sbotools.conf - configuration file for sbotools commands.
diff --git a/tools/update_man_pages.sh b/tools/update_man_pages.sh
new file mode 100755
index 0000000..6a57b4c
--- /dev/null
+++ b/tools/update_man_pages.sh
@@ -0,0 +1,135 @@
+#!/bin/sh
+
+usage_exit() {
+ echo "Usage: $(basename $0) (-d) (-g) version"
+ exit 1
+}
+
+if [[ "$1" == "" ]]; then
+ usage_exit
+fi
+
+if [[ "$1" == "-d" ]]; then
+ date=true
+ shift
+fi
+
+if [[ "$1" == "-g" ]]; then
+ git=true
+ shift
+fi
+
+if [[ "$1" == "" ]]; then
+ usage_exit
+fi
+
+version="$1"
+
+if ! [[ -d "./man1" ]]; then
+ echo "you do not seem to be at the right place to run this."
+ echo "the man{1,5}/ directories should be under ."
+ exit 1
+fi
+
+old_version=$(head -1 man1/sbocheck.1 | rev | cut -d' ' -f2 | rev \
+ | sed 's/"//g')
+
+tmpfile=$(mktemp /tmp/XXXXXXXXX)
+
+sed_file() {
+ if [[ "$1" == "" || "$2" == "" ]]; then
+ echo "sed_file(): two arguments required."
+ exit 1
+ fi
+
+ file="$1"
+ sed_cmd="$2"
+
+ cat $file | sed "$sed_cmd" > $tmpfile
+ if [[ "$?" == "0" ]]; then
+ mv $tmpfile $file
+ else
+ return 1
+ fi
+
+ return 0
+}
+
+for i in $(ls man1); do
+ sed_file man1/$i "s/$old_version/$version/g"
+done
+
+for i in $(ls man5); do
+ sed_file man5/$i "s/$old_version/$version/g"
+done
+
+if [[ "$?" == "0" ]]; then
+ echo "version updated."
+fi
+
+update_date() {
+ if ! which ddate >/dev/null 2>&1; then
+ echo "I can't find ddate."
+ return 1
+ fi
+
+ old_date=$(head -1 man1/sbocheck.1 | cut -d' ' -f4- | rev \
+ | cut -d' ' -f4- | rev | sed 's/"//g')
+
+ new_date=$(ddate +"%{%A, %B %d%}, %Y YOLD")
+
+ for i in $(ls man1); do
+ sed_file man1/$i "s/$old_date/$new_date/g"
+ done
+
+ for i in $(ls man5); do
+ sed_file man5/$i "s/$old_date/$new_date/g"
+ done
+
+ if [[ "$?" == "0" ]]; then
+ echo "date updated."
+ else
+ return 1
+ fi
+
+ return 0
+}
+
+update_git() {
+ if ! which git >/dev/null 2>&1; then
+ echo "I can't find git."
+ return 1
+ fi
+
+ if [[ "$date" == "true" ]]; then
+ extra=" and dates"
+ fi
+
+ git add man1/* man5/*
+ git commit -m "updated versions$extra for man pages"
+ git push
+
+ if [[ "$?" == "0" ]]; then
+ echo "git updated."
+ else
+ return 1
+ fi
+
+ return 0
+}
+
+if [[ "$date" == "true" ]]; then
+ update_date
+ date_return=$?
+fi
+
+if [[ "$git" == "true" ]]; then
+ update_git
+ git_return=$?
+fi
+
+if [[ "$date_return" != "0" || "$git_return" != "0" ]]; then
+ exit 1
+fi
+
+exit 0