~sourcemage/sorcery

43e2cd7fbc6cccdcba4411f0f2309948fec37da1 — Ismael Luceno 7 months ago 8d44d25
sightsee: Use CODEX_ROOT
1 files changed, 4 insertions(+), 4 deletions(-)

M usr/lib/sorcery/cmd/sightsee
M usr/lib/sorcery/cmd/sightsee => usr/lib/sorcery/cmd/sightsee +4 -4
@@ 1,6 1,6 @@
#!/bin/sh
. /etc/sorcery/local/config
codex=/var/lib/sorcery/codex
. /etc/sorcery/roots
unset debug verbose paths

upstream_rel_get() {


@@ 32,7 32,7 @@ while
      exit
      ;;
    (--codex)
      codex="$2"
      CODEX_ROOT="$2"
      shift 2
      ;;
    (--debug)


@@ 57,14 57,14 @@ do :
done

if [ $# = 0 ]; then
  paths="$codex"
  paths="$CODEX_ROOT"
else
  for i in "$@"; do
    case "$i" in
      (*/*) ;;
      (*)
        if ! [ -d "$i" ]; then
          j=$(find "$codex" -maxdepth 3 -name "$i" -type d -print -quit)
          j=$(find "$CODEX_ROOT" -maxdepth 3 -name "$i" -type d -print -quit)
          [ -d "$j" ] && i="$j"
        fi
        ;;