Nove to new layout
This commit is contained in:
33
bin/matter-scheduler-chroot
Executable file
33
bin/matter-scheduler-chroot
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
safe_exec() {
|
||||
echo "safe_exec: ${*}"
|
||||
local tries=5
|
||||
|
||||
for ((i=0; i < ${tries}; i++)); do
|
||||
"${@}" && return 0
|
||||
|
||||
if [ "${i}" = "0" ]; then
|
||||
sleep 10
|
||||
continue
|
||||
else
|
||||
sleep 60
|
||||
continue
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
cd "${PARTICLES_DIR}" || exit 1
|
||||
safe_exec git pull || exit 1
|
||||
cd "${BUILD_GIT_DIR}" || exit 1
|
||||
safe_exec git pull || exit 1
|
||||
|
||||
particles=$(find "${PARTICLES_DIR}" -name "*.particle" | sort)
|
||||
if [ -n "${particles}" ]; then
|
||||
/usr/sbin/env-update
|
||||
. /etc/profile
|
||||
matter ${MATTER_ARGS} ${particles}
|
||||
exit ${?}
|
||||
fi
|
||||
exit 1
|
||||
Reference in New Issue
Block a user