#!/bin/sh # # As lots of these scripts are run from crom, adjust PATH to include things # not naturally provided by cron, also stick the static build ffmpeg # directory at the front of the list to get the latest fmmpeg downloaded by # following a few links from ffmpeg.org (the ffmpeg in fedora is too old to # support many options and filters I need). # thisdir=`dirname $0` thisdir=`'cd' $thisdir ; /bin/pwd` ffmpegdir="/zooty/downloads/ffmpeg/2015-09-26" # newpath=`echo $PATH | sed 's@'"$ffmpegdir"'@@g' | sed 's@::@:@g'` newpath=`echo $PATH | sed 's@'"$thisdir"'@@g' | sed 's@::@:@g'` newpath=`echo $PATH | sed 's@/usr/local/bin@@g' | sed 's@::@:@g'` newpath="$ffmpegdir:$thisdir:/usr/local/bin:$newpath" echo $newpath