refactor for pkg
This commit is contained in:
parent
8204fe0df7
commit
5641ae3b1f
4
PKGBUILD
4
PKGBUILD
|
@ -25,6 +25,6 @@ package() {
|
|||
cd "$srcdir/$_pkgname"
|
||||
mkdir -p "$pkgdir/usr/share/$_pkgname/pokeData"
|
||||
install -Dm644 pokeData/* -t "$pkgdir/usr/share/$_pkgname/pokeData"
|
||||
install -Dm755 fuzzy-pokedex -t "$pkgdir/usr/bin"
|
||||
install -Dm755 pokeinfo -t "$pkgdir/usr/bin"
|
||||
install -Dm755 pokedex -t "$pkgdir/usr/bin"
|
||||
install -Dm755 pokeInfo -t "$pkgdir/usr/bin"
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ help() {
|
|||
POKEDATA="/usr/share/fuzzy-pokedex/pokeData/"
|
||||
|
||||
### Pokedex viewer using pokemon-colorscripts and fzf
|
||||
fuzzy_pokedex() {
|
||||
pokedex() {
|
||||
pokemon-colorscripts -l |
|
||||
fzf -q "$1" +m -s -i \
|
||||
--cycle \
|
||||
|
@ -44,14 +44,14 @@ fuzzy_pokedex() {
|
|||
update_pokeData() {
|
||||
echo -e "\n\t\tWARNING!!!\n\tThis WILL take a long time\n"
|
||||
if [[ -n "$1" ]]; then
|
||||
pokemon-colorscripts -l | sort | parallel --bar --color --retry-failed -j "$1" pokeinfo {} ">" "$POKEDATA"{}
|
||||
pokemon-colorscripts -l | sort | parallel --bar --color --retry-failed -j "$1" pokeInfo {} ">" "$POKEDATA"{}
|
||||
else
|
||||
pokemon-colorscripts -l | sort | parallel --bar --color --retry-failed -j 200% pokeinfo {} ">" "$POKEDATA"{}
|
||||
pokemon-colorscripts -l | sort | parallel --bar --color --retry-failed -j 200% pokeInfo {} ">" "$POKEDATA"{}
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ ! "$1" =~ ^- ]]; then
|
||||
fuzzy_pokedex "$1"
|
||||
pokedex "$1"
|
||||
else
|
||||
for opt in "$@"; do
|
||||
case $opt in
|
Loading…
Reference in New Issue