mirror of https://github.com/tLDP/LDP
Minor fixes and updates
This commit is contained in:
parent
d4efe0381c
commit
7b263f10c3
|
@ -42,9 +42,6 @@ done
|
|||
|
||||
shift $((OPTIND-1))
|
||||
|
||||
# Renice script
|
||||
renice -n 10 $$ >/dev/null
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
file_input="Linux+IPv6-HOWTO.sgml"
|
||||
#file_input="Linux+IPv6-HOWTO.xml"
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# (P) & (C) 2011 - 2011 by Dr. Peter Bieringer <pb@bieringer.de>
|
||||
#
|
||||
# wrapper script for generate.sh
|
||||
#
|
||||
# 20110517/PB: initial release
|
||||
# 20110518/PB: minor improvements
|
||||
|
||||
|
||||
URL_BASE="http://cvs.tldp.org/go.to/LDP/LDP/users/Peter-Bieringer/"
|
||||
|
||||
|
@ -18,7 +10,7 @@ FILE_PT_BR="Linux+IPv6-HOWTO.pt_BR.sgml"
|
|||
options_wget="--quiet"
|
||||
DIR_DOWNLOAD="download"
|
||||
|
||||
DIR_DEST_BASE="/var/www/html/howto"
|
||||
DIR_DEST_BASE="/var/www/html/howtos"
|
||||
|
||||
## logging
|
||||
log() {
|
||||
|
@ -53,8 +45,8 @@ download() {
|
|||
return 1
|
||||
fi
|
||||
|
||||
if [ "force_download" != "1" ]; then
|
||||
log "NOTICE" "skip download $url_base/$file (use option -f)"
|
||||
if [ "$force_download" != "1" ]; then
|
||||
log "NOTICE" "skip download $url_base/$file (use option -d)"
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
@ -102,6 +94,17 @@ check() {
|
|||
|
||||
return 0
|
||||
else
|
||||
if cmp -s "$file" "$DIR_DOWNLOAD/$file"; then
|
||||
log "INFO" "'old' is identical with 'new' file: $file"
|
||||
else
|
||||
log "NOTICE" "'old' is not equal with 'new' file: $file"
|
||||
cp -p "$DIR_DOWNLOAD/$file" "$file"
|
||||
if [ $? -ne 0 ]; then
|
||||
log "ERROR" "can't copy 'new' file to 'old' file: $DIR_DOWNLOAD/$file -> $file"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
# check contents of destination directory
|
||||
log "INFO" "check directory: $dir"
|
||||
|
||||
|
@ -129,11 +132,6 @@ check() {
|
|||
log "WARN" "'old' is newer than 'new' file: $file"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if cmp -s "$file" "$DIR_DOWNLOAD/$file"; then
|
||||
log "INFO" "'old' is identical with 'new' file: $file"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# nothing to do
|
||||
|
|
Loading…
Reference in New Issue