mirror of
https://github.com/tp7309/TTDeDroid.git
synced 2026-10-17 05:10:39 +08:00
21 lines
504 B
Bash
Executable File
21 lines
504 B
Bash
Executable File
#!/bin/sh
|
|
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
file="$(dirname $script_dir)/showjar.py"
|
|
|
|
# check python exists
|
|
if ! command -v python &> /dev/null
|
|
then
|
|
if command -v python3 &> /dev/null
|
|
then
|
|
# if python3 exists, map 'python3' to 'python' command.
|
|
alias python=python3
|
|
echo "'python3' could be found, alias python=python3"
|
|
fi
|
|
fi
|
|
|
|
if [ -f "$file" ]; then
|
|
python $file $@
|
|
else
|
|
file="$(dirname $0)/../showjar.py"
|
|
python $file $@
|
|
fi |