You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
#!/usr/bin/env bash |
|
|
|
stablesourcepath=${HOME}/lfs_archives_13_0 |
|
devsourcepath=${HOME}/lfs_archives_dev |
|
packagespath=${HOME}/packages |
|
|
|
if [ ! -d "${stablesourcepath}" ] || [ ! -h "${stablesourcepath}" ] |
|
then |
|
echo "${stablesourcepath} does not exist" |
|
exit 1 |
|
fi |
|
|
|
if [ ! -d "${devsourcepath}" ] || [ ! -h "${devsourcepath}" ] |
|
then |
|
echo "${devsourcepath} does not exist" |
|
exit 1 |
|
fi |
|
|
|
if [ ! -d "${packagespath}" ] |
|
then |
|
mkdir --verbose "${packagespath}" |
|
fi |
|
|
|
cat ./wget-list-systemd.txt | while read -r wgetitem |
|
do |
|
archivename=$(basename "${wgetitem}") |
|
echo "--- item ${archivename}" |
|
if [ -e "${packagespath}/${archivename}" ] |
|
then |
|
echo "--- already done" |
|
elif [ -e "${devsourcepath}/${archivename}" ] |
|
then |
|
ln --symbolic --verbose "${devsourcepath}/${archivename}" "${packagespath}/${archivename}" |
|
elif [ -e "${stablesourcepath}/${archivename}" ] |
|
then |
|
ln --symbolic --verbose "${stablesourcepath}/${archivename}" "${packagespath}/${archivename}" |
|
else |
|
echo "package ${archivename} not found" |
|
echo "find ${devsourcepath}/ -name ${archivename} -print" |
|
find "${devsourcepath}"/ -name "${archivename}" -print |
|
echo "find ${stablesourcepath}/ -name ${archivename} -print" |
|
find "${stablesourcepath}"/ -name "${archivename}" -print |
|
exit 1 |
|
fi |
|
done
|
|
|