Browse Source

tidy stx/downloads directory

$MY_REPO/stx/downloads contains links to tarballs and other files
relevant to the build.  It is populated by populate_downloads.sh.
On subsequent runs, new links might be added, but old links are
not cleaned up.

Adopt the convention used by generate-centos-repo.sh of moving
the old content under a timestamp backup directory, leaving
an empty directory to re-populate.

Closes-bug: 1908297
Signed-off-by: Scott Little <scott.little@windriver.com>
Change-Id: Ib6c8b782db6c369cb00e8fe8c64be099d7a5d238
changes/01/767201/1
Scott Little 1 year ago
parent
commit
1fd6f3f636
  1. 12
      toCOPY/generate-centos-repo.sh
  2. 7
      toCOPY/populate_downloads.sh

12
toCOPY/generate-centos-repo.sh

@ -183,13 +183,13 @@ if [ ! -d "${dest_dir}" ]; then
fi
for t in "Binary" "Source" ; do
target_dir=${dest_dir}/$t
if [ ! -d "$target_dir" ]; then
mkdir -p "$target_dir"
else
mv -f "$target_dir" "$target_dir-backup-$timestamp"
mkdir -p "$target_dir"
target_dir=${dest_dir}/${t}
if [ -d "${target_dir}" ]; then
mv -f "${target_dir}" "${target_dir}-backup-${timestamp}"
fi
mkdir -p "${target_dir}"
done
#

7
toCOPY/populate_downloads.sh

@ -91,7 +91,12 @@ if [ -f ${extra_downloads_lst} ]; then
fi
mkdir -p ${MY_REPO}/stx/downloads
if [ -d "${downloads_dir}" ]; then
timestamp="$(date +%F_%H%M)"
mv -f "${downloads_dir}" "${downloads_dir}-backup-${timestamp}"
fi
mkdir -p ${downloads_dir}
grep -v "^#" ${tarball_lst} | while read x; do
if [ -z "$x" ]; then

Loading…
Cancel
Save