getting local vs remote sides straight
[feisty_meow.git] / scripts / customize / fred / scripts / games / save_f76_pics.sh
1 #!/bin/bash
2
3 # copies the fallout 76 screenshots and images into our walrus metaverse hierarchy.
4
5 # pull in the feisty scripts.
6 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
7
8 # figure out where we are.  the script must have at least one side be local,
9 # so we are planning for that to be the source side.
10 source_host="$(hostname)"
11
12 # constant-like variables...
13 DESTINATION_HOST=greendragon
14
15 # decide where we're copying based on the source.
16 if [[ "$source_host" =~ clemens* ]]; then
17   character="chronical_pc"
18   identity="8836c852c8a647ba8ca45808a73c3fbb"
19 elif [[ "$source_host" =~ orpheus* ]]; then
20   character="spoonburg_pc"
21   identity="8f99c06443f04f6f8270604369bb78eb"
22 else
23   echo "
24 Could not determine the proper character name for the fallout 76 images based
25 on your source host of '$source_host' .  Can you add the details of your hostname
26 to this script?
27   => script is at '$0'
28 "
29   exit 1
30 fi
31
32 src_dir="$HOME/data/wind_goods/My Games/Fallout 76/Photos/${identity}"
33 dest_dir="fred@${DESTINATION_HOST}:/z/walrus/media/pictures/metaverse/fallout_76/${character}"
34
35 echo "src is: '$src_dir'"
36 echo "dest is: '$dest_dir'"
37
38 if [ ! -d "$src_dir" ]; then
39   echo "Could not find the source directory: $src_dir"
40   exit 1
41 fi
42 #if [ ! -d "$dest_dir" ]; then
43 #  echo "Could not find the destination directory: $dest_dir"
44 #  exit 1
45 #fi
46
47 netcp "$src_dir"/*[0-9].png "$dest_dir"/
48
49