Created
January 10, 2023 01:20
-
-
Save SuCicada/2f1b368ddc2650c013c3ccd0cbde5a33 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| SuConfig=git@github.com:SuCicada/SuEnv.git | |
| id_rsa_file=~/.ssh/su_id_rsa | |
| su_env_dir=~/.su_env | |
| #id_rsa >$id_rsa_file | |
| #chmod 600 $id_rsa_file | |
| tempfile=$(mktemp --dry-run) | |
| cat <<EOF >"$tempfile" | |
| #!/bin/bash | |
| exec ssh -oIdentityFile=${id_rsa_file} "\$@" | |
| EOF | |
| chmod a+x "$tempfile" | |
| GIT_SSH=$tempfile git clone $SuConfig $su_env_dir | |
| rm "$tempfile" | |
| #GIT_SSH_COMMAND="ssh -i ${id_rsa_file}" git clone $SuConfig $su_env_dir | |
| #chmod +x $su_env_dir/install.sh | |
| bash $su_env_dir/install.sh | |
| #id_rsa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment