Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

set -e

TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

MODEL_NAME="$1"; shift

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

set -e

TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

VENV_PATH="$1"; shift
MODEL_NAME="$1"; shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# model_name : name of model
# onnx_name : name of onnx file

THIS_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
THIS_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
PY_SCRIPT_PATH="${THIS_SCRIPT_PATH}/run_gen_onnx.py"

VENV_PATH="$1"; shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

set -e

TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

VENV_PATH="$1"; shift
RUN_PATH="$1"; shift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

set -e

TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TEST_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

VENV_PATH="$1"; shift
MODEL_NAME="$1"; shift
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really needed?
what is the problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just checked this particular one-liner and you are right, everything is OK here!

So, here is the detailed explanation what is going on, and why I've raised this PR:

Create some directory in your $HOME, e.g. mkdir -p $HOME/dir/subdir, then create a bash script in it (and make it executable), like this:

$ cat $HOME/dir/subdir/test.sh
#!/bin/bash
SOURCEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Source dir: $SOURCEDIR"

Then run this script:

$ ./dir/subdir/test.sh 
Source dir: /home/arkq/dir/subdir
$ dir/subdir/test.sh
Source dir: /home/arkq/dir/subdir

Now set the CDPATH env variable and run the script again:

$ export CDPATH=$HOME:$HOME/dir
$ ./dir/subdir/test.sh
Source dir: /home/arkq/dir/subdir
$ dir/subdir/test.sh
Source dir: /home/arkq/dir/subdir
/home/a.bokowy/dir/subdir

In the second test, the cd "$(dirname "${BASH_SOURCE[0]}")" prints the destination directory /home/arkq/dir/subdir, so the entire one-liner gets duplicated output. HOWEVER, if the one-liner uses readlink -f, e.g.: SOURCEDIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" the cd gets the absolute path, and in such case the destination directory is not printed!

$ export CDPATH=$HOME:$HOME/dir/subdir
$ cd dir/subdir
/home/arkq/dir/subdir
$ cd $HOME
$ cd $HOME/dir/subdir
$ cd $HOME

So, now the question which approach is better, discarding output or using readlink -f? I think that discarding output is safer, because resolving symlinks will cd you into different directory structure if somewhere along the path symlink was used. Then, relative paths (ones with ../../../) will no longer work.

I will update this PR to account work this finding. Also I will split this PR info separate ones for different parts of this repo.

Many thanks for the review! :)

''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2025 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
2 changes: 1 addition & 1 deletion circle-mlir/infra/overlay/prepare-venv
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fi

set -e

DRIVER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DRIVER_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
if [[ -z "$VENV_NAME" ]]; then
VENV_NAME="venv"
fi
Expand Down
2 changes: 1 addition & 1 deletion circle-mlir/infra/tools/gen-coverage-report
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# COVERAGE_PATH : path where coverage report is generated,
# default is ${PROJECT_PATH}/${COVERAGE_RPATH}

PROJECT_PATH="$(cd $(dirname ${BASH_SOURCE[0]})/../.. && pwd)"
PROJECT_PATH="$(cd $(dirname ${BASH_SOURCE[0]})/../.. >/dev/null && pwd)"

# Set BUILD_WORKSPACE_RPATH with default 'build/coverage' if not set
BUILD_WORKSPACE_RPATH="${BUILD_WORKSPACE_RPATH:-build/coverage}"
Expand Down
4 changes: 2 additions & 2 deletions compiler/circle-part-value-test/part_eval_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# work_dir : artifacts directoy where test materials exist
# venv_dir : python virtual environment home directory

VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/part_eval_one.py"
WORKDIR="$1"; shift
VIRTUALENV="$1"; shift
Expand All @@ -25,7 +25,7 @@ for TESTCASE in "$@"; do

# for simplicity, folder uses same ${TESTCASE}
TESTCASE_FOLDER="${WORKDIR}/${TESTCASE}"

PASSED_TAG="${TESTCASE_FOLDER}.passed"
rm -f "${PASSED_TAG}"

Expand Down
2 changes: 1 addition & 1 deletion compiler/circle-quantizer-dredd-recipe-test/testall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [[ $# -lt 2 ]]; then
exit 255
fi

WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
CONFIG_PATH="$1"; shift
RESOURCE_DIR="$1"; shift

Expand Down
2 changes: 1 addition & 1 deletion compiler/circle-resizer-dredd-recipe-test/testall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [[ $# -lt 2 ]]; then
exit 255
fi

WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
CONFIG_PATH="$1"; shift
RESOURCE_DIR="$1"; shift

Expand Down
2 changes: 1 addition & 1 deletion compiler/circle2circle-dredd-recipe-test/testall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [[ $# -lt 2 ]]; then
exit 255
fi

WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null >/dev/null && pwd )"
CONFIG_PATH="$1"; shift
RESOURCE_DIR="$1"; shift

Expand Down
2 changes: 1 addition & 1 deletion compiler/luci-pass-value-test/eval_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# venv_dir : python virtual environment home directory
# intp_dir : path to luci_eval_driver from luci-eval-driver

VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/eval_result_verifier.py"
BINDIR="$1"; shift
WORKDIR="$1"; shift
Expand Down
2 changes: 1 addition & 1 deletion compiler/luci-value-test/evalverify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# venv_dir : python virtual environment home directory
# eval_driver : luci_eval_driver path for evaluation

VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/luci_eval_verifier.py"
BINDIR="$1"; shift
WORKDIR="$1"; shift
Expand Down
2 changes: 1 addition & 1 deletion compiler/luci-value-test/evalverify_ref.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# ref_dir : artifacts directoy where reference test materials exist
# eval_driver : luci_eval_driver path for evaluation

VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/luci_eval_verifier_ref.py"
BINDIR="$1"; shift
REFDIR="$1"; shift
Expand Down
2 changes: 1 addition & 1 deletion compiler/luci-value-test/evalverifytol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# work_dir : artifacts directoy where test materials exist
# venv_dir : python virtual environment home directory

VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/luci_eval_verifier.py"
BINDIR="$1"; shift
WORKDIR="$1"; shift
Expand Down
2 changes: 1 addition & 1 deletion compiler/luci-value-test/evalverifytol_ref.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# ref_dir : artifacts directoy where reference test materials exist
# eval_driver : luci_eval_driver path for evaluation

VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
VERIFY_SCRIPT_PATH="${VERIFY_SOURCE_PATH}/luci_eval_verifier_ref.py"
BINDIR="$1"; shift
REFDIR="$1"; shift
Expand Down
2 changes: 1 addition & 1 deletion compiler/luci/tests/readverify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# HOW TO USE
#
# ./readverify.sh <path/to/luci_readtester> <TEST 1> <TEST 2> ...
VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

# set LOG enable to execute/test luci/logex codes
export LUCI_LOG=100
Expand Down
2 changes: 1 addition & 1 deletion compiler/luci/tests/writeverify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# HOW TO USE
#
# ./writeverify.sh <path/to/luci_writetester> <TEST 1> <TEST 2> ...
VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERIFY_SOURCE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

WORKDIR="$1"; shift
VERIFY_BINARY_PATH="$1"; shift
Expand Down
16 changes: 8 additions & 8 deletions compiler/one-cmds/one-codegen
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down Expand Up @@ -179,10 +179,10 @@ def main():
[5] one-codegen -b ${backend} ${command}
[6] one-codegen -b ${backend} -- ${command}
[7] one-codegen -b ${backend} -C {cfg} (backend, command key in cfg)
[8] one-codegen -b ${backend} -C {cfg} (backends key in cfg) (Only 'backend' is invoked,
[8] one-codegen -b ${backend} -C {cfg} (backends key in cfg) (Only 'backend' is invoked,
even though cfg file has multiple backends)
[9] one-codegen -b ${backend} -C ${cfg} -- ${command} (backend, command key in cfg)
[10] one-codegen -b ${backend} -C ${cfg} -- ${command} (backends key in cfg) (Only 'backend' is invoked,
[9] one-codegen -b ${backend} -C ${cfg} -- ${command} (backend, command key in cfg)
[10] one-codegen -b ${backend} -C ${cfg} -- ${command} (backends key in cfg) (Only 'backend' is invoked,
even though cfg file has multiple backends)
[11] one-codegen -C {cfg} (w/ target, w/ command schema)
[12] one-codegen -C {cfg} (w/ target, w/o command schema)
Expand Down
10 changes: 5 additions & 5 deletions compiler/one-cmds/one-create-quant-dataset
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
10 changes: 5 additions & 5 deletions compiler/one-cmds/one-import
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
10 changes: 5 additions & 5 deletions compiler/one-cmds/one-import-bcq
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
10 changes: 5 additions & 5 deletions compiler/one-cmds/one-import-onnx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2021 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
10 changes: 5 additions & 5 deletions compiler/one-cmds/one-import-pytorch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2025 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
10 changes: 5 additions & 5 deletions compiler/one-cmds/one-import-tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
10 changes: 5 additions & 5 deletions compiler/one-cmds/one-import-tflite
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
10 changes: 5 additions & 5 deletions compiler/one-cmds/one-infer
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
10 changes: 5 additions & 5 deletions compiler/one-cmds/one-init
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2022 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
10 changes: 5 additions & 5 deletions compiler/one-cmds/one-optimize
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''
''''export SCRIPT_PATH="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" >/dev/null && pwd)" # '''
''''export PY_PATH=${SCRIPT_PATH}/venv/bin/python # '''
''''test -f ${PY_PATH} && exec ${PY_PATH} "$0" "$@" # '''
''''echo "Error: Virtual environment not found. Please run 'one-prepare-venv' command." # '''
''''exit 255 # '''

# Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
#
Expand Down
Loading