소스 검색

Fixed handling trailing white space in track name

Thomas Buck 10 년 전
부모
커밋
6e7a552390
3개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. BIN
      SongLength.scpt
  2. BIN
      SongName.scpt
  3. 2
    2
      trackchange.sh

BIN
SongLength.scpt 파일 보기


BIN
SongName.scpt 파일 보기


+ 2
- 2
trackchange.sh 파일 보기

@@ -4,7 +4,7 @@ lasttrack=`cat /Users/thomas/.lasttrack`
4 4
 host=`hostname`
5 5
 datum=`date`
6 6
 
7
-if [ "$1" != "$lasttrack" ]; then
7
+if [ "\"$1\"" != "$lasttrack" ]; then
8 8
     if [ "$1" != "" ]; then
9 9
         echo "<html><head><meta charset=\"utf-8\" /><title>xythobuz listened to...</title></head><body><pre>" > /Users/thomas/.tmpfile
10 10
         echo "Last song played on <b>${host}</b>'s iTunes:" >> /Users/thomas/.tmpfile
@@ -21,7 +21,7 @@ if [ "$1" != "$lasttrack" ]; then
21 21
         cat /Users/thomas/.trackhistory >> /Users/thomas/.tmpfile
22 22
         echo "</pre><p><a href="http://xythobuz.de">Return...</a></p></body></html>" >> /Users/thomas/.tmpfile
23 23
 
24
-        echo $1 > /Users/thomas/.lasttrack
24
+        echo \"$1\" > /Users/thomas/.lasttrack
25 25
         echo "<b>$1</b> by <b>$2</b> on <b>$3</b> at <i>${datum}</i>" >> /Users/thomas/.trackhistory
26 26
         tail -n 3 /Users/thomas/.trackhistory | tee /Users/thomas/.trackhistory
27 27
         

Loading…
취소
저장