mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
22 lines
331 B
Bash
Executable File
22 lines
331 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
if ! [ -e ./media ] ; then
|
|
btrfs subvolume create ./media
|
|
# XXX build tree -- ImageGrid
|
|
fi
|
|
if ! [ -e ./.snapshots ] ; then
|
|
mkdir ./.snapshots
|
|
fi
|
|
|
|
#DATE=`date +%Y%m%d-%H%M%S`
|
|
|
|
SNAPSHOT=$((
|
|
$( ls .snapshots \
|
|
| sort -n \
|
|
| tail -n 1 ) \
|
|
+ 1 ))
|
|
|
|
|
|
btrfs subvolume snapshot -r ./media .snapshots/${SNAPSHOT}
|
|
|