mirror of https://git.envs.net/envs/burrow.git
testing hidden config switch config_gophermap_omitserver
This commit is contained in:
parent
2acf982073
commit
4d08e72352
32
burrow
32
burrow
|
@ -26,6 +26,7 @@ config_gopher_name="My Gopher Hole"
|
||||||
config_gopher_desc="Description"
|
config_gopher_desc="Description"
|
||||||
config_rss_num_entries="10"
|
config_rss_num_entries="10"
|
||||||
config_phlog_autorss=false
|
config_phlog_autorss=false
|
||||||
|
config_gophermap_omitserver=false
|
||||||
|
|
||||||
# coreutils function wrappers
|
# coreutils function wrappers
|
||||||
stat_func () {
|
stat_func () {
|
||||||
|
@ -240,6 +241,13 @@ make_post_gophermap () {
|
||||||
# Add appropriate link into temp gophermap
|
# Add appropriate link into temp gophermap
|
||||||
if $use_gophermap; then
|
if $use_gophermap; then
|
||||||
if $use_date; then
|
if $use_date; then
|
||||||
|
if $config_gophermap_omitserver; then
|
||||||
|
# if using gophermap and date, no server
|
||||||
|
printf "1%s - %s\\t%s\\n" \
|
||||||
|
"$(date +%Y-%m-%d)" \
|
||||||
|
"$title" \
|
||||||
|
"$post_file_path" > "$temp_gophermap"
|
||||||
|
else
|
||||||
# if using gophermap and date
|
# if using gophermap and date
|
||||||
printf "1%s - %s\\t%s\\t%s\\t%s\\n" \
|
printf "1%s - %s\\t%s\\t%s\\t%s\\n" \
|
||||||
"$(date +%Y-%m-%d)" \
|
"$(date +%Y-%m-%d)" \
|
||||||
|
@ -247,6 +255,13 @@ make_post_gophermap () {
|
||||||
"$post_file_path" \
|
"$post_file_path" \
|
||||||
"$config_gopher_server" \
|
"$config_gopher_server" \
|
||||||
"$config_gopher_port" > "$temp_gophermap"
|
"$config_gopher_port" > "$temp_gophermap"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if $config_gophermap_omitserver; then
|
||||||
|
# if using gophermap but not date, no server
|
||||||
|
printf "1%s\\t%s\\n" \
|
||||||
|
"$title" \
|
||||||
|
"$post_file_path" > "$temp_gophermap"
|
||||||
else
|
else
|
||||||
# if using gophermap but not date
|
# if using gophermap but not date
|
||||||
printf "1%s\\t%s\\t%s\\t%s\\n" \
|
printf "1%s\\t%s\\t%s\\t%s\\n" \
|
||||||
|
@ -255,8 +270,16 @@ make_post_gophermap () {
|
||||||
"$config_gopher_server" \
|
"$config_gopher_server" \
|
||||||
"$config_gopher_port" > "$temp_gophermap"
|
"$config_gopher_port" > "$temp_gophermap"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if $use_date; then
|
if $use_date; then
|
||||||
|
if $config_gophermap_omitserver; then
|
||||||
|
# if not using gophermap but using date, no server
|
||||||
|
printf "0%s - %s\\t%s\\n" \
|
||||||
|
"$(date +%Y-%m-%d)" \
|
||||||
|
"$title" \
|
||||||
|
"$post_file_path" > "$temp_gophermap"
|
||||||
|
else
|
||||||
# if not using gophermap but using date
|
# if not using gophermap but using date
|
||||||
printf "0%s - %s\\t%s\\t%s\\t%s\\n" \
|
printf "0%s - %s\\t%s\\t%s\\t%s\\n" \
|
||||||
"$(date +%Y-%m-%d)" \
|
"$(date +%Y-%m-%d)" \
|
||||||
|
@ -264,6 +287,13 @@ make_post_gophermap () {
|
||||||
"$post_file_path" \
|
"$post_file_path" \
|
||||||
"$config_gopher_server" \
|
"$config_gopher_server" \
|
||||||
"$config_gopher_port" > "$temp_gophermap"
|
"$config_gopher_port" > "$temp_gophermap"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if $config_gophermap_omitserver; then
|
||||||
|
# if not using gophermap or date, no server
|
||||||
|
printf "0%s\\t%s\\n" \
|
||||||
|
"$title" \
|
||||||
|
"$post_file_path" > "$temp_gophermap"
|
||||||
else
|
else
|
||||||
# if not using gophermap or date
|
# if not using gophermap or date
|
||||||
printf "0%s\\t%s\\t%s\\t%s\\n" \
|
printf "0%s\\t%s\\t%s\\t%s\\n" \
|
||||||
|
@ -273,7 +303,7 @@ make_post_gophermap () {
|
||||||
"$config_gopher_port" > "$temp_gophermap"
|
"$config_gopher_port" > "$temp_gophermap"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
cat "$type_gophermap" >> "$temp_gophermap"
|
cat "$type_gophermap" >> "$temp_gophermap"
|
||||||
if ! $use_date; then
|
if ! $use_date; then
|
||||||
|
|
Loading…
Reference in New Issue