Files
.config
.emacs.d
.gkrellm2
.local
bin
Chatty
Checking-repo
Logc
Logs
Update
Update-kernel
backupSynology
bin-cp
browser-x
chardetect
chatty
cleaner
cleanertmp
cmus-control
cmus-shell
cpumhz
debugger
dmenumount
dmenuumount
dmenuunicode
docker-start
dwmstatusbar
eix-repos-sync
epylint
euscan
ext
f2py
f2py3
f2py3.6
f2py3.7
f2py3.8
flask
futurize
gentoo-test
geoip
getforecast
gfetch
git-init-folder
haruhi-dl
iptables-restart
iptables-update
isort
mailsync
minecraft-launcher
mouse-set
night
notify-program
password-manager
pasteurize
pwiz.py
pylint
pyreverse
rasp
rcon
record
remove-kernel
runJava
saver-off
sb-battery
sb-clock
sb-cpu
sb-mail
sb-mem
sb-music
sb-network
sb-temp
sb-volume
sb-weather
screen-switcher
screenshot
screenshot-area
set-wallpaper
shut-sup-rest
speedtest-cli
ssh-permissions
stream
suspend-at-time
symilar
tea
temp
term-wmi
trans
twitch
video-convert
volume
welcomer
welcomer-serwer
wheel
wsl-notify
wylaczoff
yatqa
yt-mp3
yt-video
.alacritty.yml
.gitignore
.markdownlint.json
.signature
.tmux.conf
.vimrc-def
.wall.jpg
.xinitrc
.zshrc
myhome/.local/bin/Checking-repo
Marcin Woźniak c18381a3c6 Added programs
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
2021-03-22 21:27:54 +01:00

105 lines
2.2 KiB
Bash
Executable File

#!/usr/bin/env bash
####################################################
#
# SRC_PREPARE
#
# Marcin Woźniak
# y0rune@aol.com
#
# Last edit: 16-09-2020
#
###################################################
mainteiner="Marcin Woźniak"
function scanning(){
EUSCAN=$(euscan --nocolor --quiet "$1")
if [ -n "$EUSCAN" ]; then
echo $1
echo "=============== NOW: $(find ./* -mindepth 2 -maxdepth 2 -name ''"$1"'*.ebuild' | sort | tail -1) =================
$(echo -e "$EUSCAN" | tail -1)"
sleep 1
fi
}
function folder(){
cd "$1"; git pull || exit
PACKAGES=()
for FILE in */*
do
PACKAGE=$(echo "$FILE" | grep -Eo '[A-z0-9_-]+$')
PACKAGES+=("$PACKAGE")
done
for i in "${PACKAGES[@]}"
do
scanning "$i" &
done
for j in $(jobs -p)
do
wait "$j"
done
echo -n ">>> Done scanning $1"
}
function nofolder(){
if [ -z "${1}" ]; then
echo "No overlay names given"
echo "Please give at least one overlay name as a commandline argument"
echo "Exiting"
exit 1
fi
for overlay in "${@}"
do
for ebuild in $(EIX_LIMIT=0 eix --only-names --in-overlay "${overlay}")
do
euscan --nocolor --quiet "${ebuild}" &
sleep 1
done
for j in $(jobs -p)
do
wait "$j"
done
echo -n ">>> Done scanning ${overlay}"
done
}
function help(){
echo "You can use:"
echo "* -r or --repo <HERE-REPO-NAME>"
echo "* -f or --folder <FOLDER-NAME>"
echo
echo "Example of usage"
echo "./logeuscan -r src_prepare-overlay"
echo "./logeuscan -f ~/git/src_prepare-overlay"
}
function main(){
[ "$(whereis eix | wc -w)" -le "1" ] && { echo "The eix is NOT installed"; exit; }
[ "$(whereis euscan | wc -w)" -le "1" ] && { echo "The euscan is NOT installed"; exit; }
case $1 in
-h|--help)
help
;;
-r|--repo)
nofolder "$2" | tee -a "euscan-$(date -I).log"
;;
-f|--folder)
folder "$2" | tee -a "euscan-$(date -I).log"
;;
*)
echo "No found variable"; echo; help
esac
}
main "$@"