Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Build Compatibility for Git Bash For Windows #248

Closed
jcperkins12 opened this issue Aug 16, 2019 · 0 comments
Closed

Build Compatibility for Git Bash For Windows #248

jcperkins12 opened this issue Aug 16, 2019 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@jcperkins12
Copy link
Contributor

Describe the bug

Continuation of Issue#14 which seemed to be closed by insisting on building with a BASH console.

The bug is that I still get the "need to invoke from the root 'kelp' directory" error when trying to build the project on the Git Bash console on my windows computer.

Expected behavior

I think the correct behavior is to be able to build the program with the bash console that is packaged with Git

Frequency

The frequency is always

Steps To Reproduce

Here are the steps to reproduce the issue (see attachments in section below):

  1. On a windows 10 machine download git and include the git bash console
  2. Follow the build from source instructions on the readme with the bash console
  3. When you I try ./scripts/build.sh the script exits with the message "need to invoke from the root 'kelp' directory" even though I have already moved into the 'kelp' directory per the instructions.
    image

Possible Solution

After some research (Git bash doesn't recognize 'rev' command), it appears that "rev is an external command (a separate executable), not part of the shell itself; it's thus not part of any version of bash, but something that exists (or doesn't) depending on whether your it's been separately installed (or included with your operating system &c)".

As mentioned Issue#14 comment the problem is in the line pwd | rev | cut -d'/' -f1 | rev which can be rewritten as either (more research)
$(basename $("pwd"))
or
pwd | sed 's#.*/##'

Both have worked on my system and I have little linux experience to known whether either will cause issues in other environments. With that being said, my preference is for the first solution as I find it more readable.

Your Environment

When successfully run my environment is:
image

Context

As a predominantly windows user, I have found the git bash console to be the easiest one to use out of the box and is the most user friendly for those unfamiliar with unix. In order to clone the kelp repo, most users will already have git installed and likely already have this console. As such and baring integration issues with other systems, it makes sense to to try to restrict the bash scripts to commands that are native to bash whenever possible.

Attachments

@jcperkins12 jcperkins12 added the bug Something isn't working label Aug 16, 2019
@nikhilsaraf nikhilsaraf added this to the v1.8.0 milestone Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants