Newton_Editor/user_config/bin/newton

38 lines
710 B
Bash
Executable File

#!/bin/bash
# . CONFIG.sh
# set -o xtrace ## To debug scripts
# set -o errexit ## To exit on error
# set -o errunset ## To exit if a variable is referenced but not set
function main() {
call_path=`pwd`
files=()
for f in "$@"; do
# ff=${f%:*}
# ii=${f#*:}
# target=$(readlink -f "${ff}")
target=$(readlink -f "${f}")
i="${#files[@]}"
size=$(($i + 1))
files[$size]="${target}"
# if [ -n "$ii" ]; then
# files[$size]="${target}:${ii}"
# else
# files[$size]="${target}${ii}"
# fi
done
echo "${files[@]}"
cd "/opt/"
python /opt/newton.zip "${files[@]}"
}
main "$@";