[Lunar-commits] r16190 - in lunar/trunk: etc/lunar var/lib/lunar/functions
Auke Kok
sofar at lunar-linux.org
Sun Aug 21 20:41:37 UTC 2005
Author: sofar
Date: 2005-08-21 20:41:37 +0000 (Sun, 21 Aug 2005)
New Revision: 16190
Modified:
lunar/trunk/etc/lunar/config
lunar/trunk/var/lib/lunar/functions/aliases.lunar
Log:
Aliases code now lives in $MOONBASE !!!
Modified: lunar/trunk/etc/lunar/config
===================================================================
--- lunar/trunk/etc/lunar/config 2005-08-21 20:37:12 UTC (rev 16189)
+++ lunar/trunk/etc/lunar/config 2005-08-21 20:41:37 UTC (rev 16190)
@@ -22,7 +22,6 @@
FUNCTIONS=/var/lib/lunar/functions
MENUS=/var/lib/lunar/menu
SUSTAINED=/var/lib/lunar/sustained
- ALIASES=/var/lib/lunar/aliases
PLUGIN_DIR=/var/lib/lunar/plugins
SOUND_DIRECTORY=/var/lib/lunar/sound
Modified: lunar/trunk/var/lib/lunar/functions/aliases.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/aliases.lunar 2005-08-21 20:37:12 UTC (rev 16189)
+++ lunar/trunk/var/lib/lunar/functions/aliases.lunar 2005-08-21 20:41:37 UTC (rev 16190)
@@ -13,6 +13,14 @@
# and add it to the dependency chain if needed
unalias() {
local TARGET TARGETS TARGETBYNUM N CHOICE
+ # try to figure out where the aliases file is:
+ if [ -z "$ALIASES" -o ! -f "$ALIASES" ]; then
+ if [ -f "$MOONBASE/aliases" ] ; then
+ ALIASES="$MOONBASE/aliases"
+ else
+ ALIASES="/var/lib/lunar/aliases"
+ fi
+ fi
if [ "${1:0:1}" == "%" ] ; then
debug_msg "unalias($@)"
TARGETS=$(grep "^$1:" $ALIASES | cut -d: -f2-)
More information about the Lunar-commits
mailing list