Skip to content

Commit

Permalink
all: Print more directories
Browse files Browse the repository at this point in the history
* Generalize the print-home script to print any directory tree
  * Useful for checking other paths, like mounts.
* rpi: ~/RetroPie: See if the symlinks from $HOME/RetroPie/roms to
  $RETROCLOUD_RPI_MOUNT_POINT/RetroPie/roms is working
* rpi: Print the mounted VM directory listing
  • Loading branch information
seriema committed May 17, 2020
1 parent c880de9 commit 9f94a6e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
12 changes: 10 additions & 2 deletions raspberry-pi/dev/print-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ echo
echo '##############################################################################################################################################################'
echo '########## Raspberry Pi ####################################################################################################################################'

echo
echo 'PRINT: RaspberryPi ~/RetroPie all files #####################################################################################################################'
ls -la "$HOME/RetroPie" || print_fail

echo
echo 'PRINT: RaspberryPi ~/.retro-cloud.env #######################################################################################################################'
cat "$HOME/.retro-cloud.env" || print_fail
Expand All @@ -26,7 +30,11 @@ cat "$HOME/.bashrc" || print_fail

echo
echo 'PRINT: RaspberryPi ~/ directory listing #####################################################################################################################'
bash -i retro-cloud-setup/dev/list-home.sh || print_fail
bash -i retro-cloud-setup/dev/list-path.sh || print_fail

echo
echo 'PRINT: RaspberryPi /mnt (VM mount) directory listing ########################################################################################################'
bash -i retro-cloud-setup/dev/list-path.sh "$RETROCLOUD_RPI_MOUNT_POINT" || print_fail

echo
echo '##############################################################################################################################################################'
Expand All @@ -52,7 +60,7 @@ echo 'PRINT: VM ~/.bashrc #####################################################

echo
echo 'PRINT: VM ~/ directory listing ##############################################################################################################################'
./ssh-vm.sh 'bash -i retro-cloud-setup/dev/list-home.sh' || print_fail
./ssh-vm.sh 'bash -i retro-cloud-setup/dev/list-path.sh' || print_fail

echo
echo 'PRINT: VM Skyscraper config #################################################################################################################################'
Expand Down
2 changes: 1 addition & 1 deletion raspberry-pi/download-and-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ curl -fL -o "local/ssh-vm.sh" "https://raw.githubusercontent.com/seriema/retro-c
mkdir -p "dev"
curl -fL -o "dev/list-az-share.ps1" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/raspberry-pi/dev/list-az-share.ps1"
curl -fL -o "dev/print-all.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/raspberry-pi/dev/print-all.sh"
curl -fL -o "dev/list-home.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/shared/list-home.sh"
curl -fL -o "dev/list-path.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/shared/list-path.sh"
curl -fL -o "dev/run-tests.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/raspberry-pi/dev/run-tests.sh"
curl -fL -o "dev/test-az-share.ps1" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/raspberry-pi/dev/test-az-share.ps1"

Expand Down
6 changes: 0 additions & 6 deletions shared/list-home.sh

This file was deleted.

8 changes: 8 additions & 0 deletions shared/list-path.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# Take a parameter for what path to list. Defaults to the users home.
path=${1:-"$HOME"}

# Abort on error, error if variable is unset, and error if any pipeline element fails
set -euo pipefail

sudo find "$path" | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"
2 changes: 1 addition & 1 deletion virtual-machine/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mkdir "local"
curl -fL -o "local/add-scraper-credential.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/local/add-scraper-credential.sh"
curl -fL -o "local/run-skyscraper.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/local/run-skyscraper.sh"
mkdir "dev"
curl -fL -o "dev/list-home.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/shared/list-home.sh"
curl -fL -o "dev/list-path.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/shared/list-path.sh"
curl -fL -o "dev/test-copy-rom.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/dev/test-copy-rom.sh"
curl -fL -o "dev/test-gamelist-screenscraper-failed.xml" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/dev/test-gamelist-screenscraper-failed.xml"
curl -fL -o "dev/test-gamelist.sh" "https://raw.githubusercontent.com/seriema/retro-cloud/$branch/virtual-machine/dev/test-gamelist.sh"
Expand Down

0 comments on commit 9f94a6e

Please sign in to comment.