chore: add a task to create a tarball of dot files for devuser
This commit is contained in:
parent
dfdf4fe738
commit
a565ed4c33
7
.vscode/tasks.json
vendored
7
.vscode/tasks.json
vendored
@ -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
9
create-home-tarball.sh
Executable 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
|
Loading…
x
Reference in New Issue
Block a user