Skip to content

Commit

Permalink
adding lacework cli
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmordasiewicz committed Feb 18, 2025
1 parent 0c72ed0 commit 1a2c5ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lacework-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"onCreateCommand": {
"lacework-cli-persistence-setup": "/usr/local/share/lacework-cli/scripts/oncreate.sh"
},
"version": "0.0.17"
"version": "0.0.18"
}
4 changes: 2 additions & 2 deletions src/lacework-cli/oncreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ create_symlink() {
ln -s "$TARGET" "$LINK"
fi
elif [ -d "$LINK" ]; then
echo "$LINK exists as a directory. Moving its contents to $TARGET and replacing it with a symlink..."
echo "$LINK exists as a directory. Copying its contents to $TARGET and replacing it with a symlink..."
if [ ! -d "$TARGET" ]; then
mkdir -p "$TARGET"
echo "Created target directory: $TARGET"
fi
shopt -s dotglob
if [ "$(ls -A "$LINK")" ]; then
mv "$LINK"/* "$TARGET"/
cp -a "$LINK"/. "$TARGET"/
fi
shopt -u dotglob
rm -rf "$LINK"
Expand Down

0 comments on commit 1a2c5ce

Please sign in to comment.