fix(rego-tunnel): exclude swap files from ssh.zip
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
This commit is contained in:
@@ -11,7 +11,9 @@ if [ -f "$SSH_ZIP_PATH" ]; then
|
||||
chmod 700 "$SSH_ZIP_DEST"
|
||||
|
||||
echo "[rego-tunnel] Extracting $SSH_ZIP_PATH -> $SSH_ZIP_DEST"
|
||||
7z x -y -o"$SSH_ZIP_DEST" "$SSH_ZIP_PATH" >/dev/null
|
||||
# Exclude editor swap/backup files; overwrite existing.
|
||||
7z x -y -aoa -o"$SSH_ZIP_DEST" "$SSH_ZIP_PATH" \
|
||||
-x!*.swp -x!*.swo -x!*.swx -x!*~ -x!.DS_Store >/dev/null
|
||||
|
||||
find "$SSH_ZIP_DEST" -type d -exec chmod 700 {} \;
|
||||
find "$SSH_ZIP_DEST" -type f -exec chmod 600 {} \;
|
||||
|
||||
Reference in New Issue
Block a user