]>
git.rmz.io Git - dotfiles.git/blob - bin/vp
   3 # Open PKGBUILD if it exists and exit 
   4  [[ -e PKGBUILD 
]] && ${EDITOR:-vim} PKGBUILD 
&& exit 
   6 ################################################################################ 
   8 # path to the PKGBUILD.proto 
   9 PROTO
=/usr
/share
/pacman
/PKGBUILD.proto
 
  10 PROTOINST
=/usr
/share
/pacman
/proto.
install 
  11 MAINTAINER
="Samir Benmendil <samir.benmendil@gmail.com>" 
  13 ################################################################################ 
  15 echo "No PKGBUILD was found." 
  17     read -p "Do you wish to create one? [Y/n] " yn
 
  25 # get the package name 
  26 # I will consider that the folder you're in is also the pkgname 
  27 # if its not you can change it later 
  28 PKGNAME
=`basename $(pwd)` 
  31 cp $PROTOINST $PKGNAME.
install 
  33 sed -i "1,5d" PKGBUILD
 
  34 sed -i "s/# Maintainer: .*/# Maintainer: ${MAINTAINER}\n/" PKGBUILD 
 
  35 sed -i "s/pkgname=.*/pkgname=${PKGNAME}/" PKGBUILD