perusio/nginx_ensite

`make install` does not create nginx_dissite

Opened this issue · 4 comments

After running make install, no nginx_dissite was created.

workaround:

cd /usr/local/bin
ln -s nginx_ensite nginx_dissite

@arturmartins can you try the above?

Obrigado

# make install
for dir in `find bin share -type d`; do mkdir -p /usr/local/$dir; done
for file in `find bin share -type f`; do cp $file /usr/local/$file; done
mkdir -p /usr/local/share/doc/nginx_ensite-1.0.0
cd /usr/local/bin
ln -s nginx_ensite nginx_dissite
ln: failed to create symbolic link ‘nginx_dissite’: File exists
make: *** [install] Error 1
# ls -lh /usr/local/bin/nginx*
-rwxr-xr-x 1 root root 6.5K Sep 11 13:30 /usr/local/bin/nginx_ensite

??

Works if done manually though... but this is making my Salt states fail.

Looks like ln -s nginx_ensite nginx_dissite in make install is not doing the cd /usr/local/bin. In other words, he's creating the link in the current dir.

I'd also want to be able to run make install repeatedly without failing. I recommend changing those three lines to:

-       cd $(DESTDIR)$(PREFIX)/bin
-       ln -s nginx_ensite nginx_dissite
-       cd $(CURR_DIR)
+       (cd $(DESTDIR)$(PREFIX)/bin && ln -sf nginx_ensite nginx_dissite)

@helderco see this.

I used a test for the symlink.

Obrigado