You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scripts/updateList.sh

31 lines
447 B
Bash

#!/bin/bash
EC=0
function update {
if [ -f "$1" ]; then
iterateFile "$1";
elif [ -d "$1" ]; then
if ./update.sh "$1"; then
echo "Updated $1";
else
echo "Failed $1";
EC=1;
fi
else
echo "Invalid entry \"$1\"" >&2;
fi
}
function iterateFile {
while read p; do
update "$p";
done < "$1"
}
for d in "$@"; do
update "$d";
done
exit $EC;