mostly message changing
This commit is contained in:
parent
f0890e6f39
commit
18f1615739
20
setup.sh
20
setup.sh
|
@ -34,15 +34,15 @@ configure_directories() {
|
|||
local_dir=""
|
||||
remote_dir=""
|
||||
|
||||
echo "What would you like to call the local directory? (~/Remote/...)"
|
||||
echo "What would you like to call the local directory? (~/Remote/...)?"
|
||||
read -r answer
|
||||
local_dir="$HOME/Remote/$answer"
|
||||
mkdir -p "$local_dir"
|
||||
echo "Created directory $local_dir"
|
||||
echo "What directory on \"$server_name\" would you like to link it to? (Absolute path)"
|
||||
echo "Created directory $local_dir."
|
||||
echo "What directory on \"$server_name\" would you like to link it to? (absolute path)"
|
||||
read -r answer
|
||||
remote_dir="$answer"
|
||||
echo "Linking directory $local_dir to $remote_dir on \"$server_name\""
|
||||
echo "Linking directory $local_dir to $remote_dir on \"$server_name\"."
|
||||
sshfs "$server_name:$remote_dir" "$local_dir"
|
||||
echo "Done, enjoy!"
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ attempt_login() {
|
|||
ssh_temp_config="$2"
|
||||
ssh_config="$3"
|
||||
|
||||
echo "Attempting to log in with configuration for \"$server_name\""
|
||||
echo "Attempting to log in with configuration for \"$server_name\"."
|
||||
if ssh -qF "$ssh_temp_config" "$server_name" exit
|
||||
then
|
||||
echo "Login successful! Writing ssh config..."
|
||||
|
@ -72,8 +72,8 @@ attempt_login() {
|
|||
esac
|
||||
else
|
||||
echo "Login failed, what would you like to do?"
|
||||
echo " 1) Try logging in again"
|
||||
echo " 2) Re-configure my credentials"
|
||||
echo " 1) Try logging in again."
|
||||
echo " 2) Re-configure my credentials."
|
||||
read -r answer
|
||||
case "$answer" in
|
||||
"1")
|
||||
|
@ -94,10 +94,10 @@ setup_keys() {
|
|||
ssh_dir=""
|
||||
key_type=""
|
||||
|
||||
echo "Configuring \"$server_address\" as \"$server_name\""
|
||||
echo "Configuring \"$server_address\" as \"$server_name\"."
|
||||
echo "What is your login name for this server?"
|
||||
read -r login
|
||||
echo "Where is the pivate key you use for this account (Absolute path)"
|
||||
echo "Where is the private key you use for this account (absolute path)"
|
||||
read -r key_path
|
||||
if test -r "$key_path"
|
||||
then
|
||||
|
@ -155,7 +155,7 @@ pick_account() {
|
|||
;;
|
||||
esac
|
||||
else
|
||||
echo "\"$answer\" is not a valid option"
|
||||
echo "\"$answer\" is not a valid option."
|
||||
pick_account
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -118,7 +118,6 @@ get_info() {
|
|||
}
|
||||
|
||||
configure_server() {
|
||||
|
||||
ssh_current_config="$ssh_dir/config"
|
||||
ssh_temp_config="$ssh_dir/config.tmp"
|
||||
ssh_host_dir="$ssh_dir/$server_address"
|
||||
|
@ -167,7 +166,7 @@ configure_server() {
|
|||
} >> "$ssh_temp_config"
|
||||
|
||||
|
||||
info_box "Attempting to log in with the provided credentials" &
|
||||
info_box "Attempting to log in with the provided credentials..." &
|
||||
info_pid=$(( $! + 2 )) # yikes, is this safe?
|
||||
echo "$ssh_temp_config"
|
||||
echo "$server_address"
|
||||
|
@ -180,7 +179,7 @@ configure_server() {
|
|||
exit # Without this the "Host already exists" box appears, investigate.
|
||||
else
|
||||
kill $info_pid
|
||||
error_box "Login failed, please try again"
|
||||
error_box "Login failed, please try again."
|
||||
get_info
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue