mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f76f04118c
commit
c928e4767a
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# XXX this should run in script dir (not cwd)...
|
||||||
|
|
||||||
# XXX need:
|
# XXX need:
|
||||||
# - protocol (command) to create archive root
|
# - protocol (command) to create archive root
|
||||||
# - protocol to create snapshots
|
# - protocol to create snapshots
|
||||||
@ -30,13 +32,12 @@ if ! [ -e ./media ] ; then
|
|||||||
|
|
||||||
# convert ./media to a subvolume...
|
# convert ./media to a subvolume...
|
||||||
elif [ "$(stat --format=%i ./media)" == 256 ] ; then
|
elif [ "$(stat --format=%i ./media)" == 256 ] ; then
|
||||||
btrfs subvolume create ./media_subvolume
|
mkdir bak
|
||||||
#mv ./media/{,.}* ./media_subvolume/
|
mv media bak/
|
||||||
|
btrfs subvolume create ./media
|
||||||
cp --archive --one-file-system --reflink=always \
|
cp --archive --one-file-system --reflink=always \
|
||||||
./media/{,.}* \
|
./bak/media/{,.}* \
|
||||||
./media_subvolume/
|
./media/
|
||||||
mv ./media{,.bak}
|
|
||||||
mv ./media{_subvolume,}
|
|
||||||
fi
|
fi
|
||||||
mkdir -p ./.snapshots
|
mkdir -p ./.snapshots
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user