#!/bin/bash # compare-dirs: Verifies files in a directory against a # designated template file # Copyright (C) 2009 David Leutzinger (leutzdave @ charter.net) # /home/david/bin/Website/compare/compare-dirs # 2009-08-01 vs 0.2 # 2009-08-11 vs 0.3 # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # 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. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -------------------- # Functions http () { DEV_DIR="/home/david" COMPARE_DIR="http" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } android () { DEV_DIR="/home/david" COMPARE_DIR="http/Android" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } collegiate_book_shelf_edition () { DEV_DIR="/home/david" COMPARE_DIR="http/Collegiate-Book-Shelf-Edition" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } feynman () { DEV_DIR="/home/david" COMPARE_DIR="http/Feynman" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } lfs1 () { DEV_DIR="/home/david" COMPARE_DIR="http/LFS1" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } linux () { DEV_DIR="/home/david" COMPARE_DIR="http/Linux" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } misc () { DEV_DIR="/home/david" COMPARE_DIR="http/Misc" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } misc_android () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Misc/Android" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } misc_collegiate_book_shelf_edition () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Misc/Collegiate-Book-Shelf-Edition" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } misc_pc_dell_inspiron_530 () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Misc/PC_Dell-Inspiron-530" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } misc_pc_gateway_e_3400 () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Misc/PC_Gateway-E-3400" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } misc_pc_hp_compaq_sr1030nx () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Misc/PC_HP-Compaq-SR1030NX" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } misc_pics () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Misc/Pics" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } pc_dell_inspiron_530 () { DEV_DIR="/home/david" COMPARE_DIR="http/PC-Dell-Inspiron-530" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } pc_gateway_e_3400 () { DEV_DIR="/home/david" COMPARE_DIR="http/PC-Gateway-E-3400" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } pc_hp_compaq_sr1030nx () { DEV_DIR="/home/david" COMPARE_DIR="http/PC-HP-Compaq-SR1030NX" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slack () { DEV_DIR="/home/david" COMPARE_DIR="http/Slack" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slack_slackware_kernel () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Slack/Slackware-kernel" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slack_slackware_update () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Slack/Slackware-update" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slackware () { DEV_DIR="/home/david" COMPARE_DIR="http/Slackware" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slackware_slackware_kernel () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Slackware/Slackware-kernel" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slackware_slackware_update () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Slackware/Slackware-update" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slackware64 () { DEV_DIR="/home/david" COMPARE_DIR="http/Slackware64" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slackware64_slackware64_update () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/Slackware64/Slackware64-update" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slickmapcss () { DEV_DIR="/home/david" COMPARE_DIR="http/SlickmapCSS" STANDARD_FILE="about.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slickmapcss_contact () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/SlickmapCSS/contact" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slickmapcss_projects () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/SlickmapCSS/projects" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } slickmapcss_services () { DEV_DIR="/home/david" # 2nd level subdirectory COMPARE_DIR="http/SlickmapCSS/services" STANDARD_FILE="index.html" ./compare-common $DEV_DIR $COMPARE_DIR $STANDARD_FILE } # -------------------- # Main key="0" while [ "$key" != "q" ] do clear echo "" echo "" echo "" echo "" echo " 1. HTTP" echo " 2. Android" echo " 3. Collegiate-Book-Shelf-Edition" echo " 4. Feynman" echo " 5. LFS1" echo " 6. Linux" echo " 7. Misc" echo " 8. Misc/Android" echo " 9. Misc/Collegiate-Book-Shelf-Edition" echo " 10. Misc/PC_Dell-Inspiron-530" echo " 11. Misc/PC_Gateway-E-3400" echo " 12. Misc/PC_HP-Compaq-SR1030NX" echo " 13. Misc/Pics" echo " 14. PC-Dell-Inspiron-530" echo " 15. PC-Gateway-E-3400" echo " 16. PC-HP-Compaq-SR1030NX" echo " 17. Slack" echo " 18. Slack/Slackware-kernel" echo " 19. Slack/Slackware-update" echo " 20. Slackware" echo " 21. Slackware/Slackware-kernel" echo " 22. Slackware/Slackware-update" echo " 23. Slackware64" echo " 24. Slackware64/Slackware64-update" echo " 25. SlickmapCSS" echo " 26. SlickmapCSS/contact" echo " 27. SlickmapCSS/projects" echo " 28. SlickmapCSS/services" echo "" echo " A. All" echo " " echo " Enter a number" echo -n " (Enter q to quit): " read key echo "" case "$key" in '1') http ;; '2') android ;; '3') collegiate_book_shelf_edition ;; '4') feynman ;; '5') lfs1 ;; '6') linux ;; '7') misc ;; '8') misc_android ;; '9') misc_collegiate_book_shelf_edition ;; '10') misc_pc_dell_inspiron_530 ;; '11') misc_pc_gateway_e_3400 ;; '12') misc_pc_hp_compaq_sr1030nx ;; '13') misc_pics ;; '14') pc_dell_inspiron_530 ;; '15') pc_gateway_e_3400 ;; '16') pc_hp_compaq_sr1030nx ;; '17') slack ;; '18') slack_slackware_kernel ;; '19') slack_slackware_update ;; '20') slackware ;; '21') slackware_slackware_kernel ;; '22') slackware_slackware_update ;; '23') slackware64 ;; '24') slackware64_slackware64_update ;; '25') slickmapcss ;; '26') slickmapcss_contact ;; '27') slickmapcss_projects ;; '28') slickmapcss_services ;; 'A') clear http clear android clear collegiate_book_shelf_edition clear feynman clear lfs1 clear linux clear misc clear misc_android clear misc_collegiate_book_shelf_edition clear misc_pc_dell_inspiron_530 clear misc_pc_gateway_e_3400 clear misc_pc_hp_compaq_sr1030nx clear misc_pics clear pc_dell_inspiron_530 clear pc_gateway_e_3400 clear pc_hp_compaq_sr1030nx clear slack clear slack_slackware_kernel clear slack_slackware_update clear slackware clear slackware_slackware_kernel clear slackware_slackware_update clear slackware64 clear slackware64_slackware64_update clear slickmapcss clear slickmapcss_contact clear slickmapcss_projects clear slickmapcss_services ;; 'q') echo " Quiting ..." sleep 1 exit 0 ;; *) echo " Input Error: You entered an invalid key." echo " Please enter a valid number (1-6) or q" echo -n " Press [Enter] to continue. " read key esac done exit 0