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