#! /bin/sh # This file is maintained at http://git.mdcc.cx/draai # First version written at 2000-09-12. # Copyright: © 2000-2007, 2011 Joost van Baal-Ilić # © 2008 Wessel Dankers # # This program is part of draai. # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. This program is distributed WITHOUT ANY WARRANTY. You should have # received a copy of the GNU General Public License along with draai. If not, # see . set -e # rcfile=${DR_SL_RCFILE:$HOME/.draai/symlinksrc} # this should define DR_SL_TARGETS and DR_SL_SOURCE # # DR_SL_TARGETS should be relative to $DR_SL_SOURCE, e.g.: # # DR_SL_TARGETS="../../../../nfs/hille/home/dj/mp3 ../../../../nfs/schilow/var/mp3 # ../../../../nfs/schilow/home/dj/mp3 # ../../../../nfs/abramowitz/data1/8gieg/dj/mp3" # DR_SL_SOURCE=$HOME/mp3 # if test -f "$DR_SL_RCFILE" then . "$DR_SL_RCFILE" elif test -f "$HOME/.draai/symlinksrc" then . "$HOME/.draai/symlinksrc" else echo "panic: no rcfile ($HOME/.draai/symlinksrc). it should set DR_SL_TARGET and DR_SL_SOURCE." >&2 exit 1 fi # DR_DRYRUN=1 <- use this as a "-n"-option to oggsymlinks # DR_DEBUG : print debug messages (you likely want to set DR_VERBOSE too if you set this) DR_VERBOSE=${DR_SL_VERBOSE:-1} export DR_VERBOSE if command -v oggsymlinks >/dev/null then OGGSYMLINKS=$(command -v oggsymlinks) else # FIXME: evil hardcoded path. should do @expansion@ OGGSYMLINKS=/usr/share/draai/oggsymlinks fi exec $OGGSYMLINKS "$DR_SL_SOURCE" $DR_SL_TARGETS