aboutsummaryrefslogtreecommitdiffstats
path: root/src/gitjoe/addsshkey.pl
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-04-26 20:14:46 +0200
committerJoe <bousset.rudy@gmail.com>2022-04-26 20:14:46 +0200
commit57e42ba493ecc1838810bf608abb2f5feefe57f9 (patch)
treedf3ff836fb0a3509e120432e6b80f0eadd240893 /src/gitjoe/addsshkey.pl
parentEven cleaner (diff)
downloadjoe-scripts-57e42ba493ecc1838810bf608abb2f5feefe57f9.tar.gz
joe-scripts-57e42ba493ecc1838810bf608abb2f5feefe57f9.tar.bz2
joe-scripts-57e42ba493ecc1838810bf608abb2f5feefe57f9.tar.xz
joe-scripts-57e42ba493ecc1838810bf608abb2f5feefe57f9.tar.zst
joe-scripts-57e42ba493ecc1838810bf608abb2f5feefe57f9.zip
Migrated
Diffstat (limited to 'src/gitjoe/addsshkey.pl')
-rwxr-xr-xsrc/gitjoe/addsshkey.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gitjoe/addsshkey.pl b/src/gitjoe/addsshkey.pl
index 3340d64..431ce7d 100755
--- a/src/gitjoe/addsshkey.pl
+++ b/src/gitjoe/addsshkey.pl
@@ -3,6 +3,7 @@
use strict;
use warnings;
use Term::ANSIColor;
+use constant HOME_DIR => '/usr/local/git/';
sub main
{
@@ -17,7 +18,7 @@ sub main
my $usr = $ARGV[0];
my $sshkey = "no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ";
$sshkey = $sshkey . $ARGV[1];
- my $home_dir = '/usr/home/' . $usr . '/';
+ my $home_dir = HOME_DIR . $usr . '/';
open(my $fh, '>>:encoding(UTF-8)', $home_dir . '.ssh/authorized_keys');
print $fh "$sshkey\n";
close($fh);