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