[arch-general] Makefile to build all packages
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
2009/4/4 Baho Utot <baho-utot@columbus.rr.com>:
find returns the directory entry with ./ in front of the directory name Anyone know how to make find return abs instead of ./abs
If i begins with "./" you can remove it using echo $i | cut -c 3- -- Abhishek
Abhishek Dasgupta wrote:
2009/4/4 Baho Utot <baho-utot@columbus.rr.com>:
find returns the directory entry with ./ in front of the directory name Anyone know how to make find return abs instead of ./abs
If i begins with "./" you can remove it using echo $i | cut -c 3-
adding i=$(echo $i | cut -c 3-) to the script made it fail
On 2009-04-04 15:06, Baho Utot wrote:
find returns the directory entry with ./ in front of the directory name Anyone know how to make find return abs instead of ./abs
man find suggests -printf %P for this :)
On Sat, Apr 04, 2009 at 04:35:04PM -0400, Baho Utot wrote:
Kurt J. Bosch wrote:
On 2009-04-04 15:06, Baho Utot wrote:
find returns the directory entry with ./ in front of the directory name Anyone know how to make find return abs instead of ./abs
man find suggests -printf %P for this :)
doesn't work
Do you maybe need this? for i in $(find . -mindepth 1 -maxdepth 1 -type d -printf "%P\n") ; do
Alessandro Doro wrote:
On Sat, Apr 04, 2009 at 04:35:04PM -0400, Baho Utot wrote:
Kurt J. Bosch wrote:
On 2009-04-04 15:06, Baho Utot wrote:
find returns the directory entry with ./ in front of the directory name Anyone know how to make find return abs instead of ./abs
man find suggests -printf %P for this :)
doesn't work
Do you maybe need this? for i in $(find . -mindepth 1 -maxdepth 1 -type d -printf "%P\n") ; do
That did indeed work Now my script works "out of the box" Many Thanks
just a question, what the difference between «cd abs» and «cd ./abs» ? Afaik, « ./ » stand for « current directory / », so it will not change the cd target, doesn't it ? 2009/4/5, Baho Utot <baho-utot@columbus.rr.com>:
Alessandro Doro wrote:
On Sat, Apr 04, 2009 at 04:35:04PM -0400, Baho Utot wrote:
Kurt J. Bosch wrote:
On 2009-04-04 15:06, Baho Utot wrote:
find returns the directory entry with ./ in front of the directory name Anyone know how to make find return abs instead of ./abs
man find suggests -printf %P for this :)
doesn't work
Do you maybe need this? for i in $(find . -mindepth 1 -maxdepth 1 -type d -printf "%P\n") ; do
That did indeed work
Now my script works "out of the box"
Many Thanks
On Sun, 5 Apr 2009 21:02:32 +0200 ludovic coues <couesl@gmail.com> wrote:
just a question, what the difference between «cd abs» and «cd ./abs» ?
Afaik, « ./ » stand for « current directory / », so it will not change the cd target, doesn't it ?
Well, at least a $CDPATH could make the behaviour different. maybe there are more, I'm not sure. Dieter
Sure that abs is sexier than ./abs ^__^
participants (6)
-
Abhishek Dasgupta
-
Alessandro Doro
-
Baho Utot
-
Dieter Plaetinck
-
Kurt J. Bosch
-
ludovic coues