61-alpha5.2
This commit is contained in:
+28
-14
@@ -91,7 +91,8 @@ function handleCheckInstallPackages() {
|
|||||||
if [ ! -z $installPackagees ]; then
|
if [ ! -z $installPackagees ]; then
|
||||||
writeToLog "Missing packages found! Installing: $installPackagees"
|
writeToLog "Missing packages found! Installing: $installPackagees"
|
||||||
sudo apt install -y "$installPackagees"
|
sudo apt install -y "$installPackagees"
|
||||||
pkgInstallChk=returnStatus
|
returnStatus
|
||||||
|
pkgInstallChk=$?
|
||||||
else
|
else
|
||||||
writeToLog "No missing packages found, continuing\n"
|
writeToLog "No missing packages found, continuing\n"
|
||||||
fi
|
fi
|
||||||
@@ -140,25 +141,30 @@ function handleExport() {
|
|||||||
|
|
||||||
writeToLog "adding $runningDir/add-to-export-sh.txt to $exportScript"
|
writeToLog "adding $runningDir/add-to-export-sh.txt to $exportScript"
|
||||||
cat $runningDir/add-to-export-sh.txt >> $exportScript
|
cat $runningDir/add-to-export-sh.txt >> $exportScript
|
||||||
exportCatChk=returnStatus
|
returnStatus
|
||||||
|
exportCatChk=$?
|
||||||
|
|
||||||
writeToLog "editing $exportScript to remove ending \`return 0\`"
|
writeToLog "editing $exportScript to remove ending \`return 0\`"
|
||||||
sed -i 's/return 0/# return 0/g' $exportScript
|
sed -i 's/return 0/# return 0/g' $exportScript
|
||||||
exportSedReturnChk=returnStatus
|
returnStatus
|
||||||
|
exportSedReturnChk=$?
|
||||||
|
|
||||||
writeToLog "editing $exportScript with version information: $scriptVers"
|
writeToLog "editing $exportScript with version information: $scriptVers"
|
||||||
sed -i "s/versionTAG/\'$scriptVers\'/g" $exportScript
|
sed -i "s/versionTAG/\'$scriptVers\'/g" $exportScript
|
||||||
exportSedVersionChk=returnStatus
|
returnStatus
|
||||||
|
exportSedVersionChk=$?
|
||||||
|
|
||||||
dateStampInstall=$(date '+%d-%m-%Y %H:%M:%S %Z (%s)')
|
dateStampInstall=$(date '+%d-%m-%Y %H:%M:%S %Z (%s)')
|
||||||
|
|
||||||
writeToLog "editing $exportScript with install date information: $dateStampInstall"
|
writeToLog "editing $exportScript with install date information: $dateStampInstall"
|
||||||
sed -i "s/installDateTAG/\'$dateStampInstall\'/g" $exportScript
|
sed -i "s/installDateTAG/\'$dateStampInstall\'/g" $exportScript
|
||||||
exportSedDateChk=returnStatus
|
returnStatus
|
||||||
|
exportSedDateChk=$?
|
||||||
|
|
||||||
writeToLog "editing $exportScript with git commit hash data: $commitHash"
|
writeToLog "editing $exportScript with git commit hash data: $commitHash"
|
||||||
sed -i "s/commitTAG/\'$commitHash\'/g" $exportScript
|
sed -i "s/commitTAG/\'$commitHash\'/g" $exportScript
|
||||||
exportSedHashChk=returnStatus
|
returnStatus
|
||||||
|
exportSedHashChk=$?
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSetupEnvironment() {
|
function handleSetupEnvironment() {
|
||||||
@@ -200,25 +206,29 @@ function handleAliasEnviron() {
|
|||||||
if [ ! -z $(alias | grep run_esp_reinstall) ]; then
|
if [ ! -z $(alias | grep run_esp_reinstall) ]; then
|
||||||
writeToLog "run_esp_reinstall alias not found, appending to $rcFile"
|
writeToLog "run_esp_reinstall alias not found, appending to $rcFile"
|
||||||
echo "alias run_esp_reinstall='git -C $runningDir pull; cat $runningDir/version.txt; bash $runningDir/reinstall-esp-idf.sh '" >> $rcFile
|
echo "alias run_esp_reinstall='git -C $runningDir pull; cat $runningDir/version.txt; bash $runningDir/reinstall-esp-idf.sh '" >> $rcFile
|
||||||
aliasRunEspReinstallChk=returnStatus
|
returnStatus
|
||||||
|
aliasRunEspReinstallChk=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z $(alias | grep esp_monitor) ]; then
|
if [ ! -z $(alias | grep esp_monitor) ]; then
|
||||||
writeToLog "esp_monitor alias not found, appending to $rcFile"
|
writeToLog "esp_monitor alias not found, appending to $rcFile"
|
||||||
echo "alias esp_monitor='tail -n 75 -f $installDir/install.log'" >> $rcFile
|
echo "alias esp_monitor='tail -n 75 -f $installDir/install.log'" >> $rcFile
|
||||||
aliasEspMonitorchk=returnStatus
|
returnStatus
|
||||||
|
aliasEspMonitorchk=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z $(alias | grep esp_logs) ]; then
|
if [ ! -z $(alias | grep esp_logs) ]; then
|
||||||
writeToLog "esp_logs alias not found, appending to $rcFile"
|
writeToLog "esp_logs alias not found, appending to $rcFile"
|
||||||
echo "alias esp_logs='less $installDir/install.log; less $installDir/version-data.txt'" >> $rcFile
|
echo "alias esp_logs='less $installDir/install.log; less $installDir/version-data.txt'" >> $rcFile
|
||||||
aliasEspLogsChk=returnStatus
|
returnStatus
|
||||||
|
aliasEspLogsChk=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $ESPIDF_INSTALLDIR ]; then
|
if [ -z $ESPIDF_INSTALLDIR ]; then
|
||||||
writeToLog "ESPIDF_INSTALLDIR environment variable not found, appending to ${rcFile}"
|
writeToLog "ESPIDF_INSTALLDIR environment variable not found, appending to ${rcFile}"
|
||||||
echo -e "export ESPIDF_INSTALLDIR=\"${installDir}\"\n" >> $rcFile
|
echo -e "export ESPIDF_INSTALLDIR=\"${installDir}\"\n" >> $rcFile
|
||||||
aliasInstallDirChk=returnStatus
|
returnStatus
|
||||||
|
aliasInstallDirChk=$?
|
||||||
else
|
else
|
||||||
writeToLog "ESPIDF_INSTALLDIR environment variable already installed, skipping\n"
|
writeToLog "ESPIDF_INSTALLDIR environment variable already installed, skipping\n"
|
||||||
fi
|
fi
|
||||||
@@ -241,7 +251,8 @@ function handleDownloadInstall() {
|
|||||||
istartTime=$(date '+%s')
|
istartTime=$(date '+%s')
|
||||||
writeToLog "CLONING esp-idf, branch $gitBranch with $gitJobs jobs to $idfDir\n\tCommand: $gitCloneCmd\n"
|
writeToLog "CLONING esp-idf, branch $gitBranch with $gitJobs jobs to $idfDir\n\tCommand: $gitCloneCmd\n"
|
||||||
eval "$gitCloneCmd"
|
eval "$gitCloneCmd"
|
||||||
gitChk=returnStatus
|
returnStatus
|
||||||
|
gitCh=$?
|
||||||
iendTime=$(date '+%s')
|
iendTime=$(date '+%s')
|
||||||
installerTime=$(($iendTime-$istartTime))
|
installerTime=$(($iendTime-$istartTime))
|
||||||
writeToLog "Git CLONE completed in $installerTime seconds\n"
|
writeToLog "Git CLONE completed in $installerTime seconds\n"
|
||||||
@@ -251,7 +262,8 @@ function handleDownloadInstall() {
|
|||||||
istartTime=$(date '+%s')
|
istartTime=$(date '+%s')
|
||||||
writeToLog "UPDATING esp-idf, branch $gitBranch with $gitJobs jobs to $idfDir\n\tCommand: $gitUpdateCmd\n"
|
writeToLog "UPDATING esp-idf, branch $gitBranch with $gitJobs jobs to $idfDir\n\tCommand: $gitUpdateCmd\n"
|
||||||
eval "$gitUpdateCmd"
|
eval "$gitUpdateCmd"
|
||||||
gitChk=returnStatus
|
returnStatus
|
||||||
|
gitChk=$?
|
||||||
iendTime=$(date '+%s')
|
iendTime=$(date '+%s')
|
||||||
installerTime=$(($iendTime-$istartTime))
|
installerTime=$(($iendTime-$istartTime))
|
||||||
writeToLog "Git UPDATE completed in $installerTime seconds\n"
|
writeToLog "Git UPDATE completed in $installerTime seconds\n"
|
||||||
@@ -260,7 +272,8 @@ function handleDownloadInstall() {
|
|||||||
istartTime=$(date '+%s')
|
istartTime=$(date '+%s')
|
||||||
writeToLog "Executing installer\n\tCommand: $installCmd\n"
|
writeToLog "Executing installer\n\tCommand: $installCmd\n"
|
||||||
eval "$installCmd"
|
eval "$installCmd"
|
||||||
installChk=returnStatus
|
returnStatus
|
||||||
|
installChk=$?
|
||||||
iendTime=$(date '+%s')
|
iendTime=$(date '+%s')
|
||||||
installerTime=$(($iendTime-$istartTime))
|
installerTime=$(($iendTime-$istartTime))
|
||||||
writeToLog "Installer completed in $installerTime seconds\n"
|
writeToLog "Installer completed in $installerTime seconds\n"
|
||||||
@@ -268,7 +281,8 @@ function handleDownloadInstall() {
|
|||||||
istartTime=$(date '+%s')
|
istartTime=$(date '+%s')
|
||||||
writeToLog "Executing extra tools installer\n\tCommand: $toolsInstallCmd\n"
|
writeToLog "Executing extra tools installer\n\tCommand: $toolsInstallCmd\n"
|
||||||
eval "$toolsInstallCmd"
|
eval "$toolsInstallCmd"
|
||||||
toolsInstallChk=returnStatus
|
returnStatus
|
||||||
|
toolsInstallChk=$?
|
||||||
iendTime=$(date '+%s')
|
iendTime=$(date '+%s')
|
||||||
installerTime=$(($iendTime-$istartTime))
|
installerTime=$(($iendTime-$istartTime))
|
||||||
writeToLog "Extra tools installer completed in $installerTime seconds\n"
|
writeToLog "Extra tools installer completed in $installerTime seconds\n"
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
61-alpha5.1
|
61-alpha5.2
|
||||||
Reference in New Issue
Block a user