Merge ~mpontillo/uvtool:add-uvt-show-images-script into uvtool:master

Proposed by Mike Pontillo
Status: Merged
Merged at revision: e4a22e1d7fd3805e14e917e6a1716add1095e6fc
Proposed branch: ~mpontillo/uvtool:add-uvt-show-images-script
Merge into: uvtool:master
Diff against target: 15 lines (+9/-0)
1 file modified
scripts/uvt-show-images (+9/-0)
Reviewer Review Type Date Requested Status
Robie Basak Approve
Review via email: mp+314037@code.launchpad.net

Commit message

Add scripts/uvt-show-images.

  * Displays each image in the pool based on its decoded base64 string.
  * Also displays the size of each image.

To post a comment you must log in.
Revision history for this message
Robie Basak (racb) wrote :

Thanks! I found a local contrib/ tree I had prepared, so I also added some commits integrating this script into there, and merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/uvt-show-images b/scripts/uvt-show-images
2new file mode 100755
3index 0000000..c2046ff
4--- /dev/null
5+++ b/scripts/uvt-show-images
6@@ -0,0 +1,9 @@
7+#!/bin/bash
8+
9+UVTOOL_POOL=/var/lib/uvtool/libvirt/images
10+
11+for FILE in `ls -rt1 $UVTOOL_POOL`; do
12+ printf '%s %s\n' \
13+ "$(du -sh $UVTOOL_POOL/$FILE)" \
14+ "$(echo $FILE | sed 's/x-uvt-b64-//' | base64 -d | tr ' ' '_')";
15+done

Subscribers

People subscribed via source and target branches