sbotools2

Maintenance fork of the original sbotools version 2
git clone git://git.server.ky/slackcoder/sbotools2
Log | Files | Refs | README

_sboinstall (1798B)


      1 #compdef sboinstall
      2 
      3 # sbotools: https://pink-mist.github.io/sbotools/
      4 
      5 # work out where the SBo repo is (default to /usr/sbo/repo)
      6 # but also check for SBO_HOME setting in /etc/sbotools/sbotools.conf
      7 grep 'SBO_HOME' /etc/sbotools/sbotools.conf &> /dev/null
      8 if [ $? -eq 0 ]; then
      9     repo="$(grep 'SBO_HOME' /etc/sbotools/sbotools.conf | cut -d= -f2)/repo"
     10 else
     11     repo='/usr/sbo/repo'
     12 fi
     13 
     14 # grab a listing of all slackbuilds
     15 slackbuilds=( ${(uf)"$(grep 'SLACKBUILD NAME: ' $repo/SLACKBUILDS.TXT | cut -b 18-)"} )
     16 
     17 _arguments -s \
     18 	   - info \
     19 	   '(-)'{-h,--help}'[Show help]:' \
     20 	   '(-)'{-v,--version}'[Show version information.]:' \
     21 	   - commands \
     22 	   '(-c --noclean)'{-c,--noclean}'[If TRUE, then do not clean working directories after build.]:clean work dirs?:((TRUE\:"Clean works directories" FALSE\:"Keep work directories"))' \
     23 	   '(-d --distclean)'{-d,--distclean}'[If TRUE, then remove source code after building.]:clean source?:((TRUE\:"Remove source" FALSE\:"Keep source"))' \
     24 	   '(-i --noinstall)'{-i,--noinstall}'[Do not install package after building.]' \
     25 	   '(-j --jobs)'{-j,--jobs}'[Number fed to -j# for make.]:number of jobs (make):()' \
     26 	   '(-p --compat32)'{-p,--compat32}'[Create a -compat32 package on x86_64 systems (experimental).]' \
     27 	   '(-r --nointeractive)'{-r,--nointeractive}'[Skip README.]' \
     28 	   '(-R --norequirements)'{-R,--norequirements}'[Skip requirement handling.]' \
     29 	   '--reinstall[Asks for reinstall from the requirements.]' \
     30 	   '(--use-template)''--create-template[Create a template for the SlackBuilds.]:Template file:()' \
     31 	   '(--create-template)''--use-template[Use a template file (also enables -r flag).]:Template file:_files' \
     32 	   '(-)*:SlackBuild:(${slackbuilds:|words})' \
     33     && return 0
     34 
     35 return 1
     36 
     37 # Local Variables:
     38 # mode: sh
     39 # End: