#!/bin/bash #/************************************************************************** #* This program is free software; you can redistribute it and/or modify * #* it under the terms of the WTFPL 2.0 or later, see * #* http://www.wtfpl.net/about/ * #* * #* This program is distributed in the hope that it will be useful, * #* but WITHOUT ANY WARRANTY; without even the implied warranty of * #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * #* * #***************************************************************************/ # A dialog to override configuration options TITLE="Override post-processor configuration" # These are the configuration variables which can be # unset. GROUP_SIGS=1 CUSTOM_HEADERS=2 NO_ARCHIVE_GROUPS=3 #VFY_URLS=4 DEBUG_LOG=4 #CONF=$(yad --item-separator=" " --title "$TITLE" --image="" --window-icon="" --form \ # --field="Uncheck to disable options\nEsc and Cancel terminate the post-processor.":LBL ""\ # --field="Signature":CHK 'true' \ # --field="Custom-headers":CHK 'true' \ # --field="No Archive":CHK 'true' \ # --field="URL Correction":CHK 'true' \ # --field="Log":CHK 'true') CONF=$(yad --item-separator=" " --title "$TITLE" --image="" --window-icon="" --form \ --field="Uncheck to disable options\nEsc and Cancel terminate the post-processor.":LBL ""\ --field="Signature":CHK 'true' \ --field="Custom-headers":CHK 'true' \ --field="No Archive":CHK 'true' \ --field="Log":CHK 'true') if [ $? == 0 ] then IFS="|" read -ra C_ARR <<< $CONF CONF='' # -------------> # echo ${C_ARR[@]} # <------------- for i in GROUP_SIGS CUSTOM_HEADERS NO_ARCHIVE_GROUPS VFY_URLS DEBUG_LOG do if [ 'FALSE' == "${C_ARR[$i]}" ] then CONF="$i $CONF" fi done # signal the fields to disable (others will be ignored) echo $CONF else exit 1 fi