$OpenBSD: patch-util_rarian-sk-update_in,v 1.3 2009/02/14 17:31:44 ajacoutot Exp $ Fix location to rarian's localstatedir. Only GNU getopt supports long options. --- util/rarian-sk-update.in.orig Mon Sep 1 20:40:21 2008 +++ util/rarian-sk-update.in Sat Feb 14 16:34:32 2009 @@ -19,7 +19,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ -statedir=@localstatedir@/lib/rarian +statedir=@localstatedir@/db/rarian convert_dir=@CONVERT_DIR@ datarootdir=@datarootdir@ datadir=@datadir@ @@ -57,7 +57,7 @@ print_usage() echo -e "\t\t\t\tscrolls. If the directory doesn't exist, it" echo -e "\t\t\t\twill be created at run time." echo -e "\t\t\t\t Note: Multiple output paths are not supported" - echo -e "--c\t\t\t\tRebuild the index entirely. This will rebuild" + echo -e "-c\t\t\t\tRebuild the index entirely. This will rebuild" echo -e "\t\t\t\tall scroll files and may take a long time." echo -e "-v\t\t\t\tTurn Verbosity on." echo -e "-p\t\t\t\tSpecify a different place to store the mtimes file." @@ -112,7 +112,7 @@ process_dir() fi fi done - echo -e `stat -c %Y $1`':@:'$1':@:'$fname_list >> $tmpdir/rarian-updates + echo -e `stat -f %Y $1`':@:'$1':@:'$fname_list >> $tmpdir/rarian-updates } # Split up the omf dirs specified on the command line @@ -221,7 +221,7 @@ process_directory () if [[ $am_processing != "0" ]] then - new_time=`stat -c %Y $name` + new_time=`stat -f %Y $name` if [[ $new_time -ne $old_time ]] then print_verbose "Directory $name has changed. Updating." @@ -264,9 +264,7 @@ process_directory () # They are inherited from scrollkeeper :( # We use TEMP as set -- seems to nuke the return value of getopt -TEMP=`getopt -u -n$(basename $0) -o "o:r:p:vqnhV" \ - -- "$@"` \ - || print_usage +TEMP=`getopt "o:r:p:cvqnhV" "$@"` if [ $? != 0 ] ; then print_usage