Compare commits
3 Commits
14a96035b6
...
a9adb834e5
Author | SHA1 | Date | |
---|---|---|---|
a9adb834e5 | |||
f422da8d9e | |||
079979292d |
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get list of image IDs with <none> tag (dangling images)
|
||||
dangling_images=$(podman images -f "dangling=true" -q)
|
||||
|
||||
if [ -z "$dangling_images" ]; then
|
||||
echo "✅ No dangling images to remove."
|
||||
else
|
||||
echo "⚠️ Removing dangling images..."
|
||||
echo "$dangling_images" | xargs podman rmi -f
|
||||
echo "🧹 Done!"
|
||||
fi
|
24
.lazy.lua
Normal file
24
.lazy.lua
Normal file
@ -0,0 +1,24 @@
|
||||
return {
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
-- show hidden files in snacks.explorer
|
||||
picker = {
|
||||
sources = {
|
||||
explorer = {
|
||||
-- show hidden files like .env
|
||||
hidden = true,
|
||||
-- show files ignored by git like node_modules
|
||||
ignored = false,
|
||||
exclude = { ".git" },
|
||||
},
|
||||
files = {
|
||||
-- show hidden files like .env
|
||||
hidden = true,
|
||||
-- show files ignored by git like node_modules
|
||||
ignored = false,
|
||||
exclude = { ".npm", ".git" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -23,7 +23,7 @@ if [[ -z "${SSH_ORIGINAL_COMMAND:-}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
geurl() {
|
||||
geturl() {
|
||||
echo "$PROTOCOL://$HOST/$REPO/$1/branch/$BRANCH/$2"
|
||||
}
|
||||
|
||||
@ -42,6 +42,19 @@ function update() {
|
||||
chmod "$3" "$output_path"
|
||||
}
|
||||
|
||||
clean_images() {
|
||||
# Get list of image IDs with <none> tag (dangling images)
|
||||
dangling_images=$(podman images -f "dangling=true" -q)
|
||||
|
||||
if [ -z "$dangling_images" ]; then
|
||||
echo "✅ No dangling images to remove."
|
||||
else
|
||||
echo "⚠️ Removing dangling images..."
|
||||
echo "$dangling_images" | xargs podman rmi
|
||||
echo "🧹 Done!"
|
||||
fi
|
||||
}
|
||||
|
||||
# Strip arguments and parse command
|
||||
read -r command args <<<"$SSH_ORIGINAL_COMMAND"
|
||||
|
||||
@ -77,9 +90,6 @@ update)
|
||||
gitops_router)
|
||||
update gitops_router.sh .local/bin 500
|
||||
;;
|
||||
clean_dangling_images)
|
||||
update .bin/clean_dangling_images.sh .local/bin 500
|
||||
;;
|
||||
home_tar)
|
||||
update home.tar.gz . 500 media
|
||||
;;
|
||||
@ -89,7 +99,7 @@ update)
|
||||
esac
|
||||
;;
|
||||
clean)
|
||||
"$HOME"/.local/bin/clean_dangling_images.sh
|
||||
clean_images
|
||||
;;
|
||||
status)
|
||||
podman images
|
||||
|
Reference in New Issue
Block a user