Commit 125078ec authored by Marko Saukko's avatar Marko Saukko

Added ssu-repos.sh tool that currently has option to cleanup...

Added ssu-repos.sh tool that currently has option to cleanup /etc/zypp/repos.d/ for repositories that are not included in any rpm packages.
Signed-off-by: default avatarMarko Saukko <marko.saukko@jollamobile.com>
parent 6e95fa5d
......@@ -10,7 +10,7 @@ ssuconfhack {
SUBDIRS += ssuconfperm
}
SUBDIRS += tests
SUBDIRS += tests tools
rndssucli.depends = libssu
rndregisterui.depends = libssu
......
#!/bin/sh
function repo_clean {
REPO_DIR=/etc/zypp/repos.d/
TMP_DIR=${REPO_DIR}/old/
mkdir -p ${TMP_DIR}
for REPO_FILE in `ls -1 ${REPO_DIR}/*.repo`; do
rpm -qf ${REPO_FILE} &> /dev/null
if [ $? -eq 1 ]; then
echo "Moving ${REPO_FILE} to ${TMP_DIR}."
mv ${REPO_FILE} ${TMP_DIR}
fi
done
}
if [ $# -ne 1 -o "$1" != "clean" ]; then
echo "Usage: $0 clean"
exit 1
fi
repo_clean
TEMPLATE = subdirs
tools.files = ssu-repos.sh
tools.path = /usr/sbin/
INSTALLS += tools
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment