chore: add a task to create a tarball of dot files for devuser

This commit is contained in:
yeti 2025-05-16 09:30:05 +01:00
parent dfdf4fe738
commit a565ed4c33
2 changed files with 16 additions and 0 deletions

7
.vscode/tasks.json vendored
View File

@ -43,6 +43,13 @@
"command": "sudo cp access.yml /home/infilytics/ && sudo chown -R infilytics:infilytics /home/infilytics/access.yml",
"problemMatcher": [],
"detail": "Copy access.yml to /home/infilytics"
},
{
"label": "Create home tarball",
"type": "shell",
"command": "${workspaceFolder}/create-home-tarball.sh",
"problemMatcher": [],
"detail": "create home.tar.gz from .config .local .ssh start.sh"
}
],
"inputs": []

9
create-home-tarball.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
if [ "$(basename "$(pwd -P)")" != "workspaces" ]; then
echo "Error: this script must be run from a directory named 'workspaces', not '$(basename "$(pwd -P)")'" >&2
exit 1
fi
tar -czf home.tar.gz --owner root --group secproc --xform "s,$PWD,/home/devuser," .config .local .ssh start.sh