source: flacrip/trunk/setbarcode @ 43

Last change on this file since 43 was 34, checked in by peter, 10 years ago

Added interactive script to set a BARCODE property on a flac file. Will not overwrite the BARCODE if one is present, and will not set it if the input is empty.

  • Property svn:executable set to *
File size: 313 bytes
RevLine 
[34]1#!/bin/bash
2
3FLAC=$1
4
5echo "$FLAC"
6
7if [ -z $(metaflac --show-tag BARCODE "$FLAC") ]; then
8    read BARCODE
9    if [ ! -z $BARCODE ]; then
10        echo Set BARCODE to $BARCODE
11        metaflac --set-tag "BARCODE=$BARCODE" "$FLAC"
12    else
13        echo No barcode enered, skipping
14    fi
15else
16    echo Barcode already set, skipping
17fi
Note: See TracBrowser for help on using the repository browser.