I'm trying to automate my chromium dev setup. I have a script to check if depot_tools
exists in the pwd
- if not download and add to path. It works on the command line but not in the bash script:
export PATH=$PATH:$PWD/depot_tools
I'm using Ubuntu 20 if that helps.
nw.sh:
#!/bin/bash
DEPOT_TOOLS=depot_tools
if [ ! -d "${DEPOT_TOOLS}" ]; then
echo "[ WARN ] ${DEPOT_TOOLS} does not exist."
echo "[ INFO ] Downloading ${DEPOT_TOOLS}..."
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
else
echo "[ INFO ] ${DEPOT_TOOLS} already exists."
echo "[ INFO ] Adding ${DEPOT_TOOLS} to end of PATH..."
export PATH="$PATH:$PWD/${DEPOT_TOOLS}"
fi