Set local_ and remote_ vars
This commit is contained in:
parent
a123598f2a
commit
826bf47625
|
@ -1,10 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Vars {{{
|
||||
remote_dir="${HOME}/Nextcloud/games/linux.sgl.script"
|
||||
## Steam {{{
|
||||
steam_id="112595584"
|
||||
steam_userdata=".steam/steam/userdata/${steam_id}"
|
||||
## }}}
|
||||
|
||||
steam_id="1"
|
||||
steam_userdata="${HOME}/.steam/steam/userdata/${steam_id}"
|
||||
remote_dir="${HOME}/Nextcloud/games/linux.sgl.script"
|
||||
remote_steam_userdata="${remote_dir}/${steam_userdata}"
|
||||
|
||||
local_steam_userdata="${HOME}/${steam_userdata}"
|
||||
# }}}
|
||||
|
||||
# Tests {{{
|
||||
|
@ -16,11 +21,11 @@ if [ ! -d "${remote_dir}" ]; then
|
|||
fi
|
||||
## }}}
|
||||
## Ensure Steam dir exist {{{
|
||||
if [ ! -d "${steam_userdata}" ]; then
|
||||
if [ ! -d "${local_steam_userdata}" ]; then
|
||||
printf '\e[1;35m%-6s\e[m\n' "The Steam directory for your ID (${steam_id}) doesn't exists yet… Should it must be create (for restoration,…) [Y/n] ?"
|
||||
read -r create_steam_userdata
|
||||
if [ "${create_steam_userdata}" = "" ] || [ "${create_steam_userdata}" = "Y" ] || [ "${create_steam_userdata}" = "y" ]; then
|
||||
mkdir -p -- "${steam_userdata}"
|
||||
read -r create_local_steam_userdata
|
||||
if [ "${create_local_steam_userdata}" = "" ] || [ "${create_local_steam_userdata}" = "Y" ] || [ "${create_local_steam_userdata}" = "y" ]; then
|
||||
mkdir -p -- "${local_steam_userdata}"
|
||||
else
|
||||
printf '\e[1;35m%-6s\e[m\n' "Steam directory doesn't exists, abort script."
|
||||
exit 2
|
||||
|
|
Loading…
Reference in New Issue