Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ssu-repos.sh tool that currently has option to cleanup /etc/zyp…
…p/repos.d/ for repositories that are not included in any rpm packages. Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
- Loading branch information
Marko Saukko
committed
Nov 27, 2012
1 parent
6e95fa5
commit 125078e
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TEMPLATE = subdirs | ||
|
||
tools.files = ssu-repos.sh | ||
tools.path = /usr/sbin/ | ||
|
||
INSTALLS += tools | ||
|