Changeset 8de196a


Ignore:
Timestamp:
Dec 13, 2009, 1:18:45 AM (15 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
master, debian, mac, no-cups, web
Children:
97c17a0
Parents:
39452be
git-author:
Jessica B. Hamrick <jhamrick@…> (12/13/09 01:18:45)
git-committer:
Jessica B. Hamrick <jhamrick@…> (12/13/09 01:18:45)
Message:

Package installs and runs cleanly on lbsg.
Still need to test on zsr.

Location:
gutenbach-queue/debian
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gutenbach-queue/debian/gutenbach-queue.postinst

    r39452be r8de196a  
    2424        chmod +x /usr/lib/gutenbach/queue/build-gutenbach-queue
    2525        chmod +x /usr/lib/gutenbach/queue/kill-gutenbach-queue
    26         chmod +x /usr/lib/queue/view-gutenbach-queue
    27         chmod +x /usr/lib/queue/queue
    28         ln -s /usr/lib/queue/view-gutenbach-queue /usr/bin/view-gutenbach-queue
     26        chmod +x /usr/lib/gutenbach/queue/view-gutenbach-queue
     27        chmod +x /usr/lib/gutenbach/queue/queue
     28       
     29        if [ ! -e /usr/bin/view-gutenbach-queue ]; then
     30            ln -s /usr/lib/gutenbach/queue/view-gutenbach-queue /usr/bin/view-gutenbach-queue
     31        fi
     32
     33        chown -R daemon:pika /var/run/gutenbach
    2934    ;;
    3035
  • gutenbach-queue/debian/gutenbach-queue.postrm

    r39452be r8de196a  
    2222case "$1" in
    2323    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
    24             if [ -d /usr/lib/gutenbach/queue ]; then
    25                 if [ -e /usr/lib/gutenbach/queue/build-gutenbach-queue ]; then
    26                     rm /usr/lib/gutenbach/queue/build-gutenbach-queue
    27                 fi
    28 
    29                 if [ -e /usr/lib/gutenbach/queue/kill-gutenbach-queue ]; then
    30                     rm /usr/lib/gutenbach/queue/kill-gutenbach-queue
    31                 fi
    32 
    33                 if [ -e /usr/lib/gutenbach/queue/queue ]; then
    34                     rm /usr/lib/gutenbach/queue/queue
    35                 fi
    36                
    37                 if [ -e /usr/lib/gutenbach/queue/view-gutenbach-queue ]; then
    38                     rm /usr/lib/gutenbach/queue/view-gutenbach-queue
    39                 fi
    40 
    41                 rmdir /usr/lib/gutenbach/queue
     24        if [ "$1" = "purge" ]; then
     25            if [ -e /usr/lib/gutenbach/queue ]; then
     26                echo "Removing /usr/lib/gutenbach/queue/ ..." >&2
     27                rm -r  /usr/lib/gutenbach/queue
    4228            fi
    4329
    44             if [ -h /usr/bin/view-gutenbach-queue ]; then
     30            if [ -e /usr/bin/view-gutenbach-queue ]; then
     31                echo "Removing /usr/bin/view-gutenbach-queue ..." >&2
    4532                rm /usr/bin/view-gutenbach-queue
    4633            fi
     34        fi
    4735    ;;
    4836
  • gutenbach-queue/debian/lib/queue

    r39452be r8de196a  
    77fi
    88
    9 cd /var/spool/lpd/gutenbach/
    10 for i in $(ls . | grep ^hf); do
    11     done=$(cat "$i" | grep done)
     9if [ -e /usr/lib/gutenbach/config/printername ]; then
     10    printername=$(cat /usr/lib/gutenbach/config/printername)
     11
     12    cd /var/spool/lpd/"$printername"/
     13    for i in $(ls . | grep ^hf); do
     14        done=$(cat "$i" | grep done)
    1215    if [ ! -n "$done" ]; then
    1316        timestamp=$(cat "$i" | grep ^job_time= | sed 's/.*=//')
    1417        echo "$timestamp:$i" >> /var/run/gutenbach/queue_times
    1518    fi
    16 done
     19    done
    1720
    18 if [ -e /var/run/gutenbach/queue_times ]; then
    19     for i in $(sort /var/run/gutenbach/queue_times); do
    20         i=$(echo "$i" | sed 's/.*://')
    21         prefix="df"${i:2}
    22         for j in "$prefix"*; do song="$j"; done
     21    if [ -e /var/run/gutenbach/queue_times ]; then
     22        for i in $(sort /var/run/gutenbach/queue_times); do
     23            i=$(echo "$i" | sed 's/.*://')
     24            prefix="df"${i:2}
     25            for j in "$prefix"*; do song="$j"; done
    2326
    24         user=$(cat "$i" | grep ^P=)
    25         user=${user:2}
    26    
    27         if [ -e /var/run/gutenbach/exiftool_data ]; then
    28             rm /var/run/gutenbach/exiftool_data
    29         fi
     27            user=$(cat "$i" | grep ^P=)
     28            user=${user:2}
     29           
     30            if [ -e /var/run/gutenbach/exiftool_data ]; then
     31                rm /var/run/gutenbach/exiftool_data
     32            fi
    3033
    31         exiftool "$song" >> /var/run/gutenbach/exiftool_data
    32         title=$(cat /var/run/gutenbach/exiftool_data | grep "^Title " | sed 's/.*: //')
    33         artist=$(cat /var/run/gutenbach/exiftool_data | grep "^Artist " | sed 's/.*: //')
     34            exiftool "$song" >> /var/run/gutenbach/exiftool_data
     35            title=$(cat /var/run/gutenbach/exiftool_data | grep "^Title " | sed 's/.*: //')
     36            artist=$(cat /var/run/gutenbach/exiftool_data | grep "^Artist " | sed 's/.*: //')
    3437
    35         if [ -z "$found_current" ]; then
    36             host=$(cat "$i" | grep ^H=)
    37             host=${host:2}
    38             filenm="$(cat $i | grep "^filenames" | sed -e 's/filenames=//')"
    39             album=$(cat /var/run/gutenbach/exiftool_data | grep "^Album " | sed 's/.*: //')
    40             echo "$user@$host is currently playing: "
    41             echo "$filenm"
    42             echo "'$title'"
    43             echo "by '$artist'"
    44             echo "on '$album'"
    45             echo ""
    46             echo "Coming up in the queue:"
    47             found_current="true"
    48         else
    49             echo "$user: '$title' by '$artist'"
    50         fi
    51     done
     38            if [ -z "$found_current" ]; then
     39                host=$(cat "$i" | grep ^H=)
     40                host=${host:2}
     41                filenm="$(cat $i | grep "^filenames" | sed -e 's/filenames=//')"
     42                album=$(cat /var/run/gutenbach/exiftool_data | grep "^Album " | sed 's/.*: //')
     43                echo "$user@$host is currently playing: "
     44                echo "$filenm"
     45                echo "'$title'"
     46                echo "by '$artist'"
     47                echo "on '$album'"
     48                echo ""
     49                echo "Coming up in the queue:"
     50                found_current="true"
     51            else
     52                echo "$user: '$title' by '$artist'"
     53            fi
     54        done
     55    fi
     56else
     57    echo "Error: Printer name configuration file /usr/lib/gutenbach/config/printername does not exist!"
     58    exit 1
    5259fi
Note: See TracChangeset for help on using the changeset viewer.