mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00: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
|
||||
|
||||
# XXX this should run in script dir (not cwd)...
|
||||
|
||||
# XXX need:
|
||||
# - protocol (command) to create archive root
|
||||
# - protocol to create snapshots
|
||||
@ -30,13 +32,12 @@ if ! [ -e ./media ] ; then
|
||||
|
||||
# convert ./media to a subvolume...
|
||||
elif [ "$(stat --format=%i ./media)" == 256 ] ; then
|
||||
btrfs subvolume create ./media_subvolume
|
||||
#mv ./media/{,.}* ./media_subvolume/
|
||||
mkdir bak
|
||||
mv media bak/
|
||||
btrfs subvolume create ./media
|
||||
cp --archive --one-file-system --reflink=always \
|
||||
./media/{,.}* \
|
||||
./media_subvolume/
|
||||
mv ./media{,.bak}
|
||||
mv ./media{_subvolume,}
|
||||
./bak/media/{,.}* \
|
||||
./media/
|
||||
fi
|
||||
mkdir -p ./.snapshots
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user