Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 25. október 2026

Rozdiely pre scripts/shell/Mix/packages-log.sh medzi verziami 1.1 a 1.2

verzia 1.1, 2002/05/20 16:25:21 verzia 1.2, 2002/06/15 13:21:27
Riadok 1 
Riadok 1 
 #!/bin/bash  #!/bin/bash
   
 # Author:      Lubomir Host 'rajo' <host8 AT pauli.fmph.uniba.sk>  # Author:      Lubomir Host 'rajo' <host8 AT pauli.fmph.uniba.sk>
 # Description: Use this script if you will be noticed about package  #
 #              changes. E.g. put to your crontab appropiate line.  # Description: Use this script if you will be noticed about changes
   #              in installation of packages in your system.
   #              You may put sufropiate line to your crontab.
   #
   # Usage: Use ./packages-log.sh --help to see help message
   #
   
 # $Id$  # $Id$
   
Riadok 17  previous() {
Riadok 22  previous() {
         fi          fi
 }  }
   
 LOG="$HOME/crontab/packages/`previous 0`"  directory="."
 PREVIOUS_LOG="$HOME/crontab/packages/`previous 1`"  suffix=""
 OLD_LOG="$HOME/crontab/packages/`previous 2`"  
 DIFF_LOG="$HOME/crontab/packages/`previous 1`-`previous 0`.diff"  # Cmdline parsing {{{
   for option
   do
     # If the previous option needs an argument, assign it.
     if test -n "$prev"; then
       eval "$prev=\$option"
       prev=
       continue
     fi
   
     case "$option" in
     -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
     *) optarg= ;;
     esac
   
     case "$option" in
                   --directory | --director | --directo | --direct | --direc | --dire | \
                   --dir | --di | --d | -d)
                           prev=directory ;;
                   --directory=* | --director=* | --directo=* | --direct=* | --direc=* | --dire=* | \
                   --dir=* | --di=* | --d=* | -d=*)
                           directory="$optarg" ;;
   
                   --suffix | --suffi | --suff | --suf | --su | --s | -s)
                           prev=suffix ;;
                   --suffix=* | --suffi=* | --suff=* | --suf=* | --su=* | --s=* | -s=*)
                           suffix="$optarg" ;;
   
                   -help | --help | --hel | --he | --h | -h)
                   cat << EOF
   Usage:  ./packages-log.sh [-d DIR] [--suffix SUFFIX]
   
         --directory=DIR      Set output directory to Directory
         --suffix=SUFFIX      Add suffix to logfiles. Use this if you wish
                              keep some logfiles. Parameter is added
                              to the name of logfile
   EOF
                           ;;
   
                   -*) { echo "error: $option: invalid option; use --help to show usage" 1>&2; exit 1; }
                           ;;
   
           esac
   done
   # Cmdline parsing }}}
   
   LOG="$directory/`previous 0`$suffix"
   PREVIOUS_LOG="$directory/`previous 1`$suffix"
   OLD_LOG="$directory/`previous 2`$suffix"
   DIFF_LOG="$directory/`previous 1`-`previous 0`$suffix.diff"
   
 # If you have 'dpkg', probably you are on Linux Debian.  # If you have 'dpkg', probably you are on Linux Debian.
 # If dpkg not found (or not executable), use rpm  # If dpkg not found (or not executable), use rpm
Riadok 32  else
Riadok 86  else
 fi  fi
   
 # save today's list of packages  # save today's list of packages
 $PACKAGER > $LOG  $PACKAGER > "$LOG"
   
 # compare with previous log  # compare with previous log
 if [ -f "$LOG" -a -f "$PREVIOUS_LOG" ]; then  if [ -f "$LOG" -a -f "$PREVIOUS_LOG" ]; then

Legend:
Odstranené z verzie1.1  
zmenené riadky
  Pridané vo verzii1.2

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok