Changeset 8de196a
- Timestamp:
- Dec 13, 2009, 1:18:45 AM (15 years ago)
- 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)
- Location:
- gutenbach-queue/debian
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
gutenbach-queue/debian/gutenbach-queue.postinst
r39452be r8de196a 24 24 chmod +x /usr/lib/gutenbach/queue/build-gutenbach-queue 25 25 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 29 34 ;; 30 35 -
gutenbach-queue/debian/gutenbach-queue.postrm
r39452be r8de196a 22 22 case "$1" in 23 23 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 42 28 fi 43 29 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 45 32 rm /usr/bin/view-gutenbach-queue 46 33 fi 34 fi 47 35 ;; 48 36 -
gutenbach-queue/debian/lib/queue
r39452be r8de196a 7 7 fi 8 8 9 cd /var/spool/lpd/gutenbach/ 10 for i in $(ls . | grep ^hf); do 11 done=$(cat "$i" | grep done) 9 if [ -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) 12 15 if [ ! -n "$done" ]; then 13 16 timestamp=$(cat "$i" | grep ^job_time= | sed 's/.*=//') 14 17 echo "$timestamp:$i" >> /var/run/gutenbach/queue_times 15 18 fi 16 done19 done 17 20 18 if [ -e /var/run/gutenbach/queue_times ]; then19 20 i=$(echo "$i" | sed 's/.*://')21 prefix="df"${i:2}22 for j in "$prefix"*; do song="$j"; done21 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 23 26 24 user=$(cat "$i" | grep ^P=)25 user=${user:2}26 27 if [ -e /var/run/gutenbach/exiftool_data ]; then28 29 fi27 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 30 33 31 exiftool "$song" >> /var/run/gutenbach/exiftool_data32 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/.*: //') 34 37 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 56 else 57 echo "Error: Printer name configuration file /usr/lib/gutenbach/config/printername does not exist!" 58 exit 1 52 59 fi
Note: See TracChangeset
for help on using the changeset viewer.