mirror of
https://github.com/Ravinou/borgwarehouse
synced 2024-06-15 20:25:19 +02:00
feat: get last modif with single unix user
This commit is contained in:
parent
7b04e8dc4c
commit
04038b5b0d
|
@ -5,16 +5,12 @@
|
||||||
# stdout will be an array like :
|
# stdout will be an array like :
|
||||||
# [
|
# [
|
||||||
# {
|
# {
|
||||||
# "user": "09d8240f",
|
# "repositoryName": "a7035047",
|
||||||
# "lastSave": 1668513608
|
# "lastSave": 1691341603
|
||||||
# },
|
# },
|
||||||
# {
|
# {
|
||||||
# "user": "635a6f8b",
|
# "repositoryName": "a7035048",
|
||||||
# "lastSave": 1667910810
|
# "lastSave": 1691342688
|
||||||
# },
|
|
||||||
# {
|
|
||||||
# "user": "83bd4ef1",
|
|
||||||
# "lastSave": 1667985985
|
|
||||||
# }
|
# }
|
||||||
# ]
|
# ]
|
||||||
|
|
||||||
|
@ -22,6 +18,14 @@
|
||||||
# Exit when any command fails
|
# Exit when any command fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
stat --format='{"user":"%U","lastSave":%Y}' \
|
# Load .env if exists
|
||||||
/var/borgwarehouse/*/repos/*/integrity* |
|
if [[ -f .env ]]; then
|
||||||
jq --slurp
|
source .env
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Default value if .env not exists
|
||||||
|
: "${home:=/home/borgwarehouse}"
|
||||||
|
|
||||||
|
stat --format='{"repositoryName":"%n","lastSave":%Y}' \
|
||||||
|
${home}/repos/*/integrity* |
|
||||||
|
jq --slurp '[.[] | .repositoryName = (.repositoryName | split("/")[-2])]'
|
Loading…
Reference in a new issue