32 lines
543 B
Bash
Executable File
32 lines
543 B
Bash
Executable File
#!/bin/bash
|
|
|
|
OrigDir=$(pwd)
|
|
go_back() {
|
|
cd ${OrigDir}
|
|
}
|
|
trap go_back EXIT
|
|
|
|
RunDir=$(realpath $(dirname $0))
|
|
LogDir=${RunDir}/logs
|
|
|
|
cd ${RunDir}
|
|
|
|
run_retrofit() {
|
|
local Script=${1}
|
|
shift
|
|
local Source=${1}
|
|
shift
|
|
local Params=${*}
|
|
|
|
mkdir -p ${LogDir}
|
|
|
|
Cmd="nohup ${RunDir}/${Script} ${Source} ${Params} > ${LogDir}/$(date '+%Y%m%d_%H%M%S').${Script}.${Source}.log 2>&1 &"
|
|
print_and_run ${Cmd}
|
|
}
|
|
|
|
for src in cloud28 cloud29; do
|
|
run_retrofit retrofit_crypto.sh $src
|
|
done
|
|
|
|
run_retrofit sim_crypto_retrofit.sh
|