mirror of
https://github.com/libretro/Lakka-LibreELEC.git
synced 2025-04-02 10:41:46 -04:00
two new tools: create_libretro_tarballs.sh: creates a tarball of already existing folder with cloned repository for future re-use get_libretro_tarball.sh: retrieves a tarball from a mirror in case a specific version cannot be checked-out by the buildsystem create_libretro_tarballs.sh should be run by the mainteners on regular basis, so there are backups of most versions of used libretro packages/cores get_libretro_tarball.sh should be run by a builder in case the build errors due to non-existent hash in cloned repository
37 lines
839 B
Bash
Executable file
37 lines
839 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Creates .tar.xz archives of cloned libretro repositories for future re-use
|
|
# in case original repository goes awol or is force-pushed, so a build can
|
|
# be reproduced.
|
|
|
|
# Get list of libretro packages
|
|
for pkg in packages/libretro/*
|
|
do
|
|
|
|
pkg=$(basename ${pkg})
|
|
|
|
# Is there a folder for this package in sources?
|
|
if [ -d sources/${pkg} ]
|
|
then
|
|
# Is anything in that folder?
|
|
for dir in sources/${pkg}/${pkg}-*
|
|
do
|
|
# Is it a folder?
|
|
if [ -d ${dir} ]
|
|
then
|
|
# Skip in case a tarball was already created
|
|
if [ ! -f ${dir}.tar.xz ]
|
|
then
|
|
# Create a tarball in separate process, so the main loop does not change working directory
|
|
(
|
|
cd sources/${pkg}
|
|
name=$(basename ${dir})
|
|
echo $pkg - creating ${name}.tar.xz
|
|
tar -pcJf ${name}.tar.xz ${name}
|
|
)
|
|
fi
|
|
fi
|
|
done
|
|
fi
|
|
done
|
|
|