Skip to content
Snippets Groups Projects
Commit ca884a02 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

roles/sogrep: Remove obsolete files/sogrep script

parent 9d0b5fbb
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
target="/srv/ftp"
tmp=$(mktemp -d)
arches=('x86_64')
lock='/tmp/links.lck'
[ -f "${lock}" ] && echo "create links is running" && exit 1
if [ $# -ne 2 ]; then
echo "usage: $(basename $0) <repo> <soname>"
exit 1
fi
repo="${1}"
lib="${2}"
for arch in ${arches[@]}; do
db=${target}/${repo}/os/${arch}/${repo}.links.tar.gz
if [ -f ${db} ]; then
mkdir -p ${tmp}/${repo}/${arch}
bsdtar -xf ${db} -C ${tmp}/${repo}/${arch}
fi
done
for i in $(grep -rl "${lib}" ${tmp}); do
pkg=$(basename $(dirname $i))
echo ${pkg%-*-*}
done | sort -u
rm -rf ${tmp}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment