aboutsummaryrefslogtreecommitdiffstats
path: root/devscripts/comments.bash
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-12-23 14:47:56 -0500
committerJesús <heckyel@hyperbola.info>2021-12-23 14:47:56 -0500
commit9ad16fd3cc51f9bf36674d580d4fd9ae1fc66bda (patch)
tree6eaa9bbb354f5c2c9ec9f30baf1e0752fd33547d /devscripts/comments.bash
parent4547c3cb6137620e9016f87f871db0ad14486a91 (diff)
downloadcl-9ad16fd3cc51f9bf36674d580d4fd9ae1fc66bda.tar.lz
cl-9ad16fd3cc51f9bf36674d580d4fd9ae1fc66bda.tar.xz
cl-9ad16fd3cc51f9bf36674d580d4fd9ae1fc66bda.zip
[drone-ci]: add deploy
Diffstat (limited to 'devscripts/comments.bash')
-rw-r--r--devscripts/comments.bash22
1 files changed, 22 insertions, 0 deletions
diff --git a/devscripts/comments.bash b/devscripts/comments.bash
new file mode 100644
index 0000000..8aebff5
--- /dev/null
+++ b/devscripts/comments.bash
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Prepare SSH
+home="/root"
+
+mkdir -p "$home/.ssh"
+
+printf "StrictHostKeyChecking no\n" > "$home/.ssh/config"
+
+chmod 0700 "$home/.ssh/config"
+
+keyfile="$home/.ssh/id_rsa"
+echo "$SSH_KEY" | grep -q "ssh-ed25519"
+if [ $? -eq 0 ]; then
+ printf "Using ed25519 based key\n"
+ keyfile="$home/.ssh/id_ed25519"
+fi
+echo "$SSH_KEY" > $keyfile
+chmod 0600 $keyfile
+
+# pull comments
+git clone git@git.conocimientoslibres.ga:cl-syscomment.git ./content/comments