diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-01-08 14:27:24 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-01-08 14:27:24 +0000 |
commit | ef5cc722a967fcb0a9af1a62f6f5bb8007c10e8b (patch) | |
tree | b0ce786a5106e5d7272a8d53912d3faf3312c131 /reproduce | |
parent | 00d22fb56fa4a9760a040ee4411e4c9d5ebcfb23 (diff) |
When installing Bash, check if the sh link is already present
After installing Bash, we would just blindly try to build the $(ibdir)/sh'
symbolic link. But that could fail if it already existed. To make things
clean, we now remove any link first before attempting to make a new one.
Diffstat (limited to 'reproduce')
-rw-r--r-- | reproduce/src/make/dependencies-basic.mk | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk index 89abd0a..8625cf6 100644 --- a/reproduce/src/make/dependencies-basic.mk +++ b/reproduce/src/make/dependencies-basic.mk @@ -433,7 +433,8 @@ $(ibdir)/which: $(tdir)/which-$(which-version).tar.gz \ $(ibdir)/bash: $(tdir)/bash-$(bash-version).tar.gz \ $(ibdir)/make - # Delete any possibly existing output + # Delete any possibly existing output (so it doesn't interfere with + # the build: we are building bash itself!) if [ -f $@ ]; then rm $@; fi; # Build Bash. @@ -450,8 +451,12 @@ endif # # Just to be sure that the installation step above went well, # before making the link, we'll see if the file actually exists + # there and remove any possibly existing link that might already be # there. - if [ -f $@ ]; then ln -fs $@ $(ibdir)/sh; fi + if [ -f $(ibdir)/sh ]; then rm $(ibdir)/sh; fi + if [ -f $@ ]; then ln -s $@ $(ibdir)/sh; \ + else echo "Bash not build!"; exit 1; fi + |