make_sndlist.sh 429 B

123456789101112131415161718
  1. #!/bin/bash
  2. #relative:
  3. ACTIONDIR=./..
  4. cd $ACTIONDIR
  5. ACTIONDIR=$(pwd)
  6. # now it's absolute
  7. SNDDIR=$ACTIONDIR/sound/user
  8. CFGDIR=$ACTIONDIR/config
  9. cd $SNDDIR
  10. echo "looking for all .wav files inside: $(pwd)"
  11. find -type f -iname "*wav" | sed -e 's/\.\///' > $CFGDIR/sndlist.ini.current
  12. cd $CFGDIR
  13. cp sndlist.ini.header sndlist.ini
  14. sort sndlist.ini.current >> sndlist.ini
  15. echo "file sndlist.ini should be created now inside: $(pwd)"