Makefile to build all packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I am working on a makefile to build all the packages in a abs repos

Here is what I have

#
# Maker.sh
#

rm Makefile

echo 'CHROOT=/home/Build.Chroot' >> Makefile
echo 'REPO=CORE' >> Makefile
echo 'REPOS=/home/${REPO}' >> Makefile
echo 'PKG=i686.pkg.tar.gz' >> Makefile

echo -e "all:\t ALL" >> Makefile

for i in $(find . -type d) ; do
   upper=$(echo ${i} | tr "[:lower:]" "[:upper:]")
   ALL=${ALL}" "${upper}
   echo "${upper}:" >> Makefile
   echo -e "\tsudo mkarchroot -u "'$(CHROOT)/root' >> Makefile
echo -e "\tcd ${i}; sudo makechrootpkg -r "'$(CHROOT);mv *.pkg.* $(REPOS)' >> Makefile echo -e "\trepo-add "'$(REPOS)/$(REPO).db.tar.gz $(REPOS)/'"${i}"'*' >> Makefile
   echo -e "\ttouch "'$@' >> Makefile
done
echo -e "ALL:\t ${ALL}" >> Makefile

It produces a Makefile with entries like this

./ABS:
   sudo mkarchroot -u $(CHROOT)/root
   cd ./abs; sudo makechrootpkg -r $(CHROOT);mv *.pkg.* $(REPOS)
   repo-add $(REPOS)/$(REPO).db.tar.gz $(REPOS)/./abs*
   touch $@


I want it to be like this (the ./ removed )

ABS:
   sudo mkarchroot -u $(CHROOT)/root
   cd abs; sudo makechrootpkg -r $(CHROOT);mv *.pkg.* $(REPOS)
   repo-add $(REPOS)/$(REPO).db.tar.gz $(REPOS)/abs*
   touch $@


find returns the directory entry with ./ in front of the directory name
Anyone know how to make find return abs instead of ./abs

Thanks




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux