meat
This commit is contained in:
@@ -1,10 +1,22 @@
|
|||||||
|
# usage
|
||||||
|
## sync_media [NUKE]
|
||||||
|
|
||||||
$media_viewer_dir="C:\Users\human\OneDrive\Documents\Git\Media-Viewer"
|
$media_viewer_dir="C:\Users\human\OneDrive\Documents\Git\Media-Viewer"
|
||||||
Set-Location "$media_viewer_dir"
|
$media_viewer_dir_wsl="/mnt/c/Users/human/OneDrive/Documents/Git/Media-Viewer/"
|
||||||
|
|
||||||
|
# select for nuke mode
|
||||||
|
if($args[0] -eq "NUKE") {
|
||||||
|
Write-Host "`nNUKE MODE ACTIVATED`n"
|
||||||
|
$nuke = $True
|
||||||
|
} else {
|
||||||
|
Write-Host "`nNormal Mode Activated`n"
|
||||||
|
$nuke = $False
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host "`nSillyfillyy synching media loleen`n"
|
Write-Host "`nSillyfillyy synching media loleen`n"
|
||||||
|
|
||||||
Write-Host "`nChanging directory to Media-Viewer`n"
|
Write-Host "`nChanging directory to $media_viewer_dir`n"
|
||||||
cd "$media_viewer_dir"
|
Set-Location "$media_viewer_dir"
|
||||||
|
|
||||||
# get da synciedink
|
# get da synciedink
|
||||||
Write-Host "`nSyncing`n"
|
Write-Host "`nSyncing`n"
|
||||||
@@ -14,7 +26,14 @@ gitsync
|
|||||||
|
|
||||||
# do da synchiedink
|
# do da synchiedink
|
||||||
Write-Host "`nDoing the syncy dink`n"
|
Write-Host "`nDoing the syncy dink`n"
|
||||||
wsl bash full_sync_normalization_wsl.sh bfy
|
# wsl -d kali-wsl "\$(whoami) \$(uname -a)" # debug
|
||||||
|
if($nuke) {
|
||||||
|
Write-Host "`nNUKING media loleen sync`n"
|
||||||
|
wsl bash $media_viewer_dir_wsl/full_sync_normalization_wsl.sh byfn
|
||||||
|
} else {
|
||||||
|
Write-Host "`nNormal media loleen sync`n"
|
||||||
|
wsl bash $media_viewer_dir_wsl/full_sync_normalization_wsl.sh byf
|
||||||
|
}
|
||||||
|
|
||||||
# normieize media
|
# normieize media
|
||||||
Write-Host "`nNormalizing favorites`n"
|
Write-Host "`nNormalizing favorites`n"
|
||||||
@@ -22,11 +41,21 @@ ssh pi3 "bash /var/www/html/Media-Viewer/normalize_favorites.sh"
|
|||||||
|
|
||||||
# remote esp-idf
|
# remote esp-idf
|
||||||
Write-Host "`nRunning esp-idf-tools update`n"
|
Write-Host "`nRunning esp-idf-tools update`n"
|
||||||
ssh pi3 "bash /home/princesspi/esp/esp-idf-tools/esp-idf-tools-cmd.sh"
|
if($nuke) {
|
||||||
|
Write-Host "`nNUKING esp-idf-tools update`n"
|
||||||
|
ssh pi3 "bash /home/princesspi/esp/esp-idf-tools/esp-idf-tools-cmd.sh n"
|
||||||
|
} else {
|
||||||
|
Write-Host "`nNormal esp-idf-tools update`n"
|
||||||
|
ssh pi3 "bash /home/princesspi/esp/esp-idf-tools/esp-idf-tools-cmd.sh"
|
||||||
|
}
|
||||||
|
|
||||||
# remote backup
|
# reboot pi3 to apply updates
|
||||||
Write-Host "`nRunning restic backup`n"
|
if($nuke) {
|
||||||
ssh pi3 "sudo bash /home/princesspi/.restic/restic_backup.sh"
|
Write-Host "`nNUKING reboot of pi3 to apply updates`n"
|
||||||
|
ssh pi3 "sudo shutdown -r +10 'Rebooting in 10 minutes to apply updates'"
|
||||||
|
} else {
|
||||||
|
Write-Host "`nSkipping remote reboot`n"
|
||||||
|
}
|
||||||
|
|
||||||
# do more sync at enddy to maek syre it goodywoo
|
# do more sync at enddy to maek syre it goodywoo
|
||||||
Write-Host "`nSyncing finaly`n"
|
Write-Host "`nSyncing finaly`n"
|
||||||
|
|||||||
Reference in New Issue
Block a user