Skip to content

Commit

Permalink
Fix paths in root-level deltacode scripts #163
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Esser <[email protected]>
  • Loading branch information
steven-esser committed Mar 15, 2021
1 parent e13be07 commit 6aba023
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions deltacode
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2018 nexB Inc. http://www.nexb.com/ - All rights reserved.
# Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved.
#

# A minimal shell wrapper to the CLI entry point fo DeltaCode
Expand Down Expand Up @@ -100,15 +100,15 @@ _canonicalize_file_path() {
}

###################################################################################
# Now run scancode proper
# Now run deltacode proper

DELTACODE_BIN="$( realpath "${BASH_SOURCE[0]}" )"
DELTACODE_ROOT_DIR="$( cd "$( dirname "${DELTACODE_BIN}" )" && pwd )"

DELTACODE_CONFIGURED_PYTHON="$DELTACODE_ROOT_DIR/bin/python"
DELTACODE_CONFIGURED_PYTHON="$DELTACODE_ROOT_DIR/tmp/bin/python"
if [ ! -f "$DELTACODE_CONFIGURED_PYTHON" ]; then
echo "* Configuring DeltaCode for first use..."
CONFIGURE_QUIET=1 "$DELTACODE_ROOT_DIR/configure" etc/conf
fi

"$DELTACODE_ROOT_DIR/bin/deltacode" "$@"
"$DELTACODE_ROOT_DIR/tmp/bin/deltacode" "$@"
6 changes: 3 additions & 3 deletions deltacode.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@echo OFF
@rem Copyright (c) 2018 nexB Inc. http://www.nexb.com/ - All rights reserved.
@rem Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved.

@rem A minimal shell wrapper to the CLI entry point

set DELTACODE_ROOT_DIR=%~dp0
@rem Use a trailing space in the next line to set the variable to an empty string
set DELTACODE_CMD_LINE_ARGS=
set DELTACODE_CONFIGURED_PYTHON=%DELTACODE_ROOT_DIR%\bin\python.exe
set DELTACODE_CONFIGURED_PYTHON=%DELTACODE_ROOT_DIR%\tmp\bin\python.exe

@rem Collect all command line arguments in a variable
:collectarg
Expand All @@ -29,6 +29,6 @@ if %errorlevel% neq 0 (
)

:deltacode
"%DELTACODE_ROOT_DIR%\bin\deltacode" %DELTACODE_CMD_LINE_ARGS%
"%DELTACODE_ROOT_DIR%\tmp\bin\deltacode" %DELTACODE_CMD_LINE_ARGS%

:EOS

0 comments on commit 6aba023

Please sign in to comment.