aboutsummaryrefslogtreecommitdiff
path: root/linaro-hwpack-install
diff options
context:
space:
mode:
Diffstat (limited to 'linaro-hwpack-install')
-rwxr-xr-xlinaro-hwpack-install9
1 files changed, 6 insertions, 3 deletions
diff --git a/linaro-hwpack-install b/linaro-hwpack-install
index d730de2..4acf3d7 100755
--- a/linaro-hwpack-install
+++ b/linaro-hwpack-install
@@ -83,14 +83,17 @@ HWPACK_ARCH=`grep ARCHITECTURE "${HWPACK_DIR}/metadata" | cut -d "=" -f2`
# Install the apt sources that contain the packages we need.
for filename in $(ls "${HWPACK_DIR}"/sources.list.d/); do
file="${HWPACK_DIR}"/sources.list.d/$filename
+ found=0
while read line; do
# Skip any files that contain lines that are already present in the apt
# configuration.
- grep -q "$line" /etc/apt/sources.list.d/* && continue
- grep -q "$line" /etc/apt/sources.list && continue
+ grep -q "$line" /etc/apt/sources.list.d/* && found=1 && continue
+ grep -q "$line" /etc/apt/sources.list && found=1 && continue
done < $file
- sudo cp $file /etc/apt/sources.list.d/hwpack.$filename
+ if [ $found -eq 0 ]; then
+ sudo cp $file /etc/apt/sources.list.d/hwpack.$filename
+ fi
done
# Import the OpenPGP keys for the files installed above.