Kaydet (Commit) 999599b5 authored tarafından Ali Rıza Keskin's avatar Ali Rıza Keskin

update-inary-cache güncellendi

üst e8ed3024
......@@ -9,4 +9,3 @@ build:
install:
python3 setup.py install
ln -s /usr/bin/inary-cli /usr/bin/inary || true
install shell-complete/bash-complete.sh /usr/share/bash-completion/completions/inary
......@@ -3,14 +3,9 @@ if [ $UID -ne 0 ] ; then
echo "You must be root!"
exit 1
fi
inary dc
inary ur
echo
echo "Listing avaiable..."
inary la --no-color | awk -F ' ' '{print $1}' > /var/cache/inary/avaiable
echo "Listing installed..."
inary li --no-color | awk -F ' ' '{print $1}' > /var/cache/inary/installed
echo "Listing repos..."
ls /var/lib/inary/index/ > /var/cache/inary/repos
echo
echo "Done"
dest=""
[ "$1" == "" ] || dest="-D$1"
inary dc $dest
inary rdb $dest
inary ur $dest
inary it -c system.base $dest
_inary()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="ar bl bi check cm cp dc dt dr em emup er fc graph hs ix info it la lc li ln ln lp lr lu rdb rp ro rr sr sf ur up"
if [[ ${cur} == * ]] && [ ${prev} == inary ] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
fi
if [[ ${cur} == * ]] && [ ${prev} == it ] ; then
avaiable=$(cat /var/cache/inary/avaiable)
COMPREPLY=( $(compgen -W "${avaiable}" -- ${cur}) )
fi
if [[ ${cur} == * ]] && [ ${prev} == rm ] ; then
avaiable=$(cat /var/cache/inary/installed)
COMPREPLY=( $(compgen -W "${avaiable}" -- ${cur}) )
fi
if [[ ${cur} == * ]] && [ ${prev} == rr ] ; then
avaiable=$(cat /var/cache/inary/repos)
COMPREPLY=( $(compgen -W "${avaiable}" -- ${cur}) )
fi
}
complete -F _inary inary
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment