61-dev1.3
This commit is contained in:
+17
-13
@@ -26,14 +26,11 @@ scriptVers=$(cat $runningDir/version.txt) # make sure version.txt does NOT have
|
|||||||
arg=$1 # just rename the argument var for clarity with the functions
|
arg=$1 # just rename the argument var for clarity with the functions
|
||||||
|
|
||||||
# commands
|
# commands
|
||||||
gitCloneCmd="git clone --recursive --jobs $gitJobs --branch $gitBranch https://github.com/espressif/esp-idf $idfDir" # no --single-branch
|
gitCloneCmd="git clone --recursive --jobs $gitJobs --branch $gitBranch https://github.com/espressif/esp-idf $idfDir"
|
||||||
# gitCmd="git clone --recursive --jobs $gitJobs --branch $gitBranch --single-branch https://github.com/espressif/esp-idf $idfDir"
|
|
||||||
|
|
||||||
gitUpdateCmd="git -C $idfDir reset --hard; git -C $idfDir clean -df; git -C $idfDir pull $idfDir" # mayhapsnasst?
|
gitUpdateCmd="git -C $idfDir reset --hard; git -C $idfDir clean -df; git -C $idfDir pull $idfDir" # mayhapsnasst?
|
||||||
|
|
||||||
installCmd="$idfDir/install.sh all"
|
installCmd="$idfDir/install.sh all"
|
||||||
|
|
||||||
toolsInstallCmd="$idfDir/tools/idf_tools.py install all"
|
toolsInstallCmd="$idfDir/tools/idf_tools.py install all"
|
||||||
|
idfGet="update" # default method
|
||||||
|
|
||||||
# full order:
|
# full order:
|
||||||
# set action string variable
|
# set action string variable
|
||||||
@@ -201,8 +198,8 @@ function handleAliasEnviron() {
|
|||||||
function handleDownloadInstall() {
|
function handleDownloadInstall() {
|
||||||
writeToLog "Handling download and install (function ran)"
|
writeToLog "Handling download and install (function ran)"
|
||||||
|
|
||||||
if [ "$idfGet" == "download" ]; then
|
if [ "$idfGet" == "download" -o ! -d "$idfDir" ]; then
|
||||||
if [ -d $fullWipe ]; then
|
if [ ! -d "$idfDir" ]; then
|
||||||
writeToLog "deleting $idfDir"
|
writeToLog "deleting $idfDir"
|
||||||
rm -rf $idfDir
|
rm -rf $idfDir
|
||||||
returnStatus
|
returnStatus
|
||||||
@@ -210,11 +207,11 @@ function handleDownloadInstall() {
|
|||||||
writeToLog "$idfDir not found, skipping delete"
|
writeToLog "$idfDir not found, skipping delete"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
writeToLog "CLONING git branch $gitBranch with $gitJobs jobs to $idfDir"
|
writeToLog "CLONING esp-idf, branch $gitBranch with $gitJobs jobs to $idfDir"
|
||||||
eval "$gitCloneCmd"
|
eval "$gitCloneCmd"
|
||||||
returnStatus
|
returnStatus
|
||||||
else
|
else
|
||||||
writeToLog "UPDATING git branch $gitBranch with $gitJobs jobs to $idfDir"
|
writeToLog "UPDATING esp-idf, branch $gitBranch with $gitJobs jobs to $idfDir"
|
||||||
eval "$gitUpdateCmd"
|
eval "$gitUpdateCmd"
|
||||||
returnStatus
|
returnStatus
|
||||||
fi
|
fi
|
||||||
@@ -335,11 +332,21 @@ function handleStart() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleEmptyLogs() {
|
function handleEmptyLogs() {
|
||||||
|
echo "Deleting $log"
|
||||||
rm -f $log
|
rm -f $log
|
||||||
touch $log
|
echo -e "\treturn status: ${?}\n"
|
||||||
|
|
||||||
|
echo "Deleting $versionData"
|
||||||
rm -f $versionData
|
rm -f $versionData
|
||||||
|
echo -e "\treturn status: ${?}\n"
|
||||||
|
|
||||||
|
echo "Creating empty file at $log"
|
||||||
|
touch $log
|
||||||
|
echo "\treturn status: ${?}\n"
|
||||||
|
|
||||||
|
echo "Creating empty file at $versionData"
|
||||||
touch $versionData
|
touch $versionData
|
||||||
|
echo -e "\treturn status: ${?}\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleEnd() {
|
function handleEnd() {
|
||||||
@@ -361,7 +368,6 @@ elif [ "$arg" == "test" -o "$arg" == "t" ]; then # minimal actions taken, echo t
|
|||||||
action="TEST"
|
action="TEST"
|
||||||
sleepMins=0
|
sleepMins=0
|
||||||
testExport=1
|
testExport=1
|
||||||
idfGet="update"
|
|
||||||
|
|
||||||
installCmdTemp="echo $installCmd"
|
installCmdTemp="echo $installCmd"
|
||||||
toolsInstallCmdTemp="echo $toolsInstallCmd"
|
toolsInstallCmdTemp="echo $toolsInstallCmd"
|
||||||
@@ -451,7 +457,6 @@ elif [ "$arg" == "interactive" -o "$arg" == "i" ]; then
|
|||||||
|
|
||||||
elif [ "$arg" == "cron" -o "$arg" == "c" ]; then # full install with warn, sleep, and reboot
|
elif [ "$arg" == "cron" -o "$arg" == "c" ]; then # full install with warn, sleep, and reboot
|
||||||
action="REINSTALL (CRON)"
|
action="REINSTALL (CRON)"
|
||||||
idfGet="update"
|
|
||||||
sleepMins=3
|
sleepMins=3
|
||||||
|
|
||||||
handleStart
|
handleStart
|
||||||
@@ -487,7 +492,6 @@ elif [ "$arg" == "nuke" -o "$arg" == "n" ]; then # clear logs
|
|||||||
|
|
||||||
else # full noninteractive (re)install without logout, reboot, or sleeps
|
else # full noninteractive (re)install without logout, reboot, or sleeps
|
||||||
action="REINSTALL (DEFAULT)"
|
action="REINSTALL (DEFAULT)"
|
||||||
idfGet="update"
|
|
||||||
|
|
||||||
handleStart
|
handleStart
|
||||||
handleSetupEnvironment
|
handleSetupEnvironment
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
61-dev1.2
|
61-dev1.3
|
||||||
Reference in New Issue
Block a user