summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xonce/update.sh23
1 files changed, 21 insertions, 2 deletions
diff --git a/once/update.sh b/once/update.sh
index d38ba83..748f65b 100755
--- a/once/update.sh
+++ b/once/update.sh
@@ -11,10 +11,29 @@ else
fi
for tarball in /updates/*.tar.gz; do
+ tarball="${tarball##*/}"
+
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- echo extracting files from $tarball
+ echo extracting files from /updates/$tarball
+ echo ..................................................
+ tar -xpvf /updates/$tarball -C "$SYSROOT" || exit 2
+
+ echo archiving old $tarball
echo ..................................................
- tar -xpvf $tarball -C "$SYSROOT" || exit 2
+
+ if [ -f /tarballs/$tarball ]; then
+ pkgsig=$(sha256sum /tarballs/$tarball)
+ pkgsig=${pkgsig%% *}
+ pkgdir=/tarballs/archive/${tarball%%.tar.gz}/$pkgsig/
+ mkdir -p $pkgdir
+ mv /tarballs/$tarball $pkgdir
+ fi
+
+ echo caching the current $tarball
+ echo ..................................................
+ mv /updates/$tarball /tarballs/
+ mv /updates/$tarball.sha256 /tarballs/
+
echo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
echo
done