tomasino's ideas

This commit is contained in:
fosslinux 2019-01-26 11:35:32 +11:00 committed by Samuel Tyler
parent a48dd54bb9
commit 221798b2a5
2 changed files with 5 additions and 6 deletions

View File

@ -32,9 +32,8 @@ install_scripts() {
full_path="${install_dir}/${f}"
cp "$f" "$install_dir"
printf "Copied %s to %s.\\n" "$f" "$full_path"
chmod +x "%s" "$full_path"
printf "Made %s executable.\\n" "$full_path"
printf ""
chmod +x "$full_path"
printf "Made %s executable.\\n\\n" "$full_path"
fi
done
}

View File

@ -105,9 +105,9 @@ setup_keys() {
key_type=$(head -n 1 "$key_path" \
| cut -f 2 -d ' ' \
| tr '[:upper:]' '[:lower:]')
test -d "$ssh_dir" || mkdir "$ssh_dir"
test -d "$ssh_host_dir" || mkdir "$ssh_host_dir"
printf "Key appears to be of type \"%s\"." "$key_type\\n"
test -d "$ssh_dir" || mkdir -p "$ssh_dir"
test -d "$ssh_host_dir" || mkdir -p "$ssh_host_dir"
printf "Key appears to be of type \"%s\".\\n" "$key_type"
printf "Generating public key...\\n"
ssh-keygen -y -f "$key_path" > "${ssh_host_dir}/id_${key_type}.pub"
printf "Copying private key...\\n"