6-prerelease3
This commit is contained in:
+9
-18
@@ -104,8 +104,7 @@ function writeToLog() {
|
|||||||
|
|
||||||
# this is not needed so long as warn doesnt god damned fucking work lmfao
|
# this is not needed so long as warn doesnt god damned fucking work lmfao
|
||||||
function handleSleep() {
|
function handleSleep() {
|
||||||
writeToLog "Handling sleep hold (function ran)\n"
|
# writeToLog "Handling sleep hold (function ran)\n"
|
||||||
|
|
||||||
sleepSecs=$(($sleepMins*60)) # calculated seconds of warning to wait for user to log out
|
sleepSecs=$(($sleepMins*60)) # calculated seconds of warning to wait for user to log out
|
||||||
|
|
||||||
writeToLog "Sleeping $sleepMins minutes"
|
writeToLog "Sleeping $sleepMins minutes"
|
||||||
@@ -115,8 +114,7 @@ function handleSleep() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleCheckInstallPackages() {
|
function handleCheckInstallPackages() {
|
||||||
writeToLog "Handling check and install packages (function ran)\n"
|
# writeToLog "Handling check and install packages (function ran)\n"
|
||||||
|
|
||||||
packages=(git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0)
|
packages=(git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0)
|
||||||
|
|
||||||
for package in "${packages[@]}"; do
|
for package in "${packages[@]}"; do
|
||||||
@@ -140,8 +138,7 @@ function handleCheckInstallPackages() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleCustomBins() {
|
function handleCustomBins() {
|
||||||
writeToLog "Handling custon bins (function ran)\n"
|
# writeToLog "Handling custon bins (function ran)\n"
|
||||||
|
|
||||||
if [ -d $customBinLocation ]; then
|
if [ -d $customBinLocation ]; then
|
||||||
writeToLog "Deleting $customBinLocation"
|
writeToLog "Deleting $customBinLocation"
|
||||||
rm -rf $customBinLocation
|
rm -rf $customBinLocation
|
||||||
@@ -163,8 +160,7 @@ function handleCustomBins() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
writeToLog "Handling $exportScript (function ran)\n"
|
# writeToLog "Handling $exportScript (function ran)\n"
|
||||||
|
|
||||||
if [ -z $testExport ]; then
|
if [ -z $testExport ]; then
|
||||||
writeToLog "testExport not set\n"
|
writeToLog "testExport not set\n"
|
||||||
|
|
||||||
@@ -215,8 +211,7 @@ function handleExport() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleSetupEnvironment() {
|
function handleSetupEnvironment() {
|
||||||
writeToLog "Handling setup environment (function ran)\n"
|
# writeToLog "Handling setup environment (function ran)\n"
|
||||||
|
|
||||||
if [ ! -d "$installDir" ]; then
|
if [ ! -d "$installDir" ]; then
|
||||||
writeToLog "creating $installDir"
|
writeToLog "creating $installDir"
|
||||||
mkdir $installDir
|
mkdir $installDir
|
||||||
@@ -277,8 +272,7 @@ function handleAliasEnviron() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleDownloadInstall() {
|
function handleDownloadInstall() {
|
||||||
writeToLog "Handling download and install (function ran)\n"
|
# writeToLog "Handling download and install (function ran)\n"
|
||||||
|
|
||||||
if [[ "$idfGet" == "download" || ! -d "$idfDir" ]]; then
|
if [[ "$idfGet" == "download" || ! -d "$idfDir" ]]; then
|
||||||
writeToLog "Setting for download mode\n"
|
writeToLog "Setting for download mode\n"
|
||||||
|
|
||||||
@@ -344,15 +338,13 @@ function handleDownloadInstall() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleReboot() {
|
handleReboot() {
|
||||||
writeToLog "Handling reboot: (function ran)\n"
|
# writeToLog "Handling reboot: (function ran)\n"
|
||||||
|
|
||||||
sudo reboot
|
sudo reboot
|
||||||
}
|
}
|
||||||
|
|
||||||
# warning not work how i make it work fuckin ell
|
# warning not work how i make it work fuckin ell
|
||||||
handleWarnAllUsers() {
|
handleWarnAllUsers() {
|
||||||
writeToLog "Warning all users of impending logout (function called)\n"
|
# writeToLog "Warning all users of impending logout (function called)\n"
|
||||||
|
|
||||||
warningString="\nWARNING:\n\tReinstalling esp-idf:\n\tForce logut in $sleepMins minutes!!\n\tSave and log out!\n\tmonitor with \`esp+monitor\`\n\tterminate with \`sudo killall reinstall-esp-idf.sh\`\n"
|
warningString="\nWARNING:\n\tReinstalling esp-idf:\n\tForce logut in $sleepMins minutes!!\n\tSave and log out!\n\tmonitor with \`esp+monitor\`\n\tterminate with \`sudo killall reinstall-esp-idf.sh\`\n"
|
||||||
|
|
||||||
writeToLog "$warningString"
|
writeToLog "$warningString"
|
||||||
@@ -379,8 +371,7 @@ handleWarnAllUsers() {
|
|||||||
|
|
||||||
# dis one sure af be workan tho lmfao
|
# dis one sure af be workan tho lmfao
|
||||||
function handleLogoutAllUsers() {
|
function handleLogoutAllUsers() {
|
||||||
writeToLog "Handling user logout (function ran)\n"
|
# writeToLog "Handling user logout (function ran)\n"
|
||||||
|
|
||||||
handleWarnAllUsers
|
handleWarnAllUsers
|
||||||
|
|
||||||
loggedIn=$(who | awk '{print $1}' | uniq)
|
loggedIn=$(who | awk '{print $1}' | uniq)
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
6-prerelease2
|
6-prerelease3
|
||||||
Reference in New Issue
Block a user