Where should I put my own bash scripts in GsDevKit_home?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Where should I put my own bash scripts in GsDevKit_home?

GLASS mailing list
Dale,

I am wondering where it is supposed someone would store his own stone-wide bash scripts. It looks to me the correct place MAY be `$GS_HOME/sys/local/bin`. And that directory is associated to a git repo: https://github.com/GsDevKit/GsDevKit_sys_local

So...it is nice to know I could manage all the GsDevKit_sys_local in my own git fork. But...I have a couple of questions:

1) Say I add stuff (like some bash scripts) into  `$GS_HOME/sys/local/bin`. For a moment imagine I do not commit this into my own git fork. So...what would happen when I update gsDevKit_home? how can I be sure I won't loose those files with a latest override from your git repo? 

2) Say I do want to commit all that directory into my own git fork. Where in gsDevKit_home configuration  can I tell it which URL/branch should be used for GsDevKit/GsDevKit_sys_local ?

Thanks in advance, 


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Where should I put my own bash scripts in GsDevKit_home?

GLASS mailing list



On 11/9/16 1:35 PM, Mariano Martinez Peck via Glass wrote:
Dale,

I am wondering where it is supposed someone would store his own stone-wide bash scripts. It looks to me the correct place MAY be `$GS_HOME/sys/local/bin`. And that directory is associated to a git repo: https://github.com/GsDevKit/GsDevKit_sys_local

So...it is nice to know I could manage all the GsDevKit_sys_local in my own git fork. But...I have a couple of questions:

1) Say I add stuff (like some bash scripts) into  `$GS_HOME/sys/local/bin`. For a moment imagine I do not commit this into my own git fork. So...what would happen when I update gsDevKit_home? how can I be sure I won't loose those files with a latest override from your git repo?
The update uses git pull, so barring any collisions your local uncommitted scripts will be untouched ...

The original GsDevKit_sys_local[1] project simply provides a standard directory structure for your scripts so there is no intention to ever put any scripts or files in any of those directories, except the README.md file (which is the placeholder to ensure that git will create the directory).

[1] https://github.com/GsDevKit/GsDevKit_sys_local

2) Say I do want to commit all that directory into my own git fork. Where in gsDevKit_home configuration  can I tell it which URL/branch should be used for GsDevKit/GsDevKit_sys_local ?

Thanks in advance, 



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Where should I put my own bash scripts in GsDevKit_home?

GLASS mailing list


On Wed, Nov 9, 2016 at 6:35 PM, Dale Henrichs <[hidden email]> wrote:



On 11/9/16 1:35 PM, Mariano Martinez Peck via Glass wrote:
Dale,

I am wondering where it is supposed someone would store his own stone-wide bash scripts. It looks to me the correct place MAY be `$GS_HOME/sys/local/bin`. And that directory is associated to a git repo: https://github.com/GsDevKit/GsDevKit_sys_local

So...it is nice to know I could manage all the GsDevKit_sys_local in my own git fork. But...I have a couple of questions:

1) Say I add stuff (like some bash scripts) into  `$GS_HOME/sys/local/bin`. For a moment imagine I do not commit this into my own git fork. So...what would happen when I update gsDevKit_home? how can I be sure I won't loose those files with a latest override from your git repo?
The update uses git pull, so barring any collisions your local uncommitted scripts will be untouched ...

The original GsDevKit_sys_local[1] project simply provides a standard directory structure for your scripts so there is no intention to ever put any scripts or files in any of those directories, except the README.md file (which is the placeholder to ensure that git will create the directory).

[1] https://github.com/GsDevKit/GsDevKit_sys_local

2) Say I do want to commit all that directory into my own git fork. Where in gsDevKit_home configuration  can I tell it which URL/branch should be used for GsDevKit/GsDevKit_sys_local ?

Mariano, I had written a detailed answer to this step, but I lost the edit before I could send it ... I will have to re-create the answer :(

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Where should I put my own bash scripts in GsDevKit_home?

GLASS mailing list
In reply to this post by GLASS mailing list


On Wed, Nov 9, 2016 at 6:35 PM, Dale Henrichs <[hidden email]> wrote:



On 11/9/16 1:35 PM, Mariano Martinez Peck via Glass wrote:
 
2) Say I do want to commit all that directory into my own git fork. Where in gsDevKit_home configuration  can I tell it which URL/branch should be used for GsDevKit/GsDevKit_sys_local ?

First you will add a remote pointing at your fork of the project on Github:

  git remote add mine [hidden email]:marianopeck/GsDevKit_sys_local.git

Then you will create the file $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env with the following contents:

  export GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT=mine
  export GSDEVKIT_SYS_LOCAL_GIT_REMOTE=<branch-name>

You will want to create a unique branch in your fork to manage your changes, so that you can keep the master branch clean for updates.

updateGsDevKit will:
  1. git checkout master
  2. git pull origin master
  3. git checkout <branch-name>
  4. git merge master

Dale


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Where should I put my own bash scripts in GsDevKit_home?

GLASS mailing list

On Wed, Nov 9, 2016 at 6:47 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On Wed, Nov 9, 2016 at 6:35 PM, Dale Henrichs <[hidden email]> wrote:



On 11/9/16 1:35 PM, Mariano Martinez Peck via Glass wrote:
 
2) Say I do want to commit all that directory into my own git fork. Where in gsDevKit_home configuration  can I tell it which URL/branch should be used for GsDevKit/GsDevKit_sys_local ?

First you will add a remote pointing at your fork of the project on Github:

  git remote add mine [hidden email]:marianopeck/GsDevKit_sys_local.git

Then you will create the file $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env with the following contents:

  export GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT=mine
  export GSDEVKIT_SYS_LOCAL_GIT_REMOTE=<branch-name>

You will want to create a unique branch in your fork to manage your changes, so that you can keep the master branch clean for updates.

updateGsDevKit will:
  1. git checkout master
  2. git pull origin master
  3. git checkout <branch-name>
  4. git merge master


Hi Dale,

Thanks for your answer. I got it.  Now I wonder... would the above instructions also work if I use gitlab instead of github? (I want the project to be private).

Thanks in advance 




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Where should I put my own bash scripts in GsDevKit_home?

GLASS mailing list
Mariano,

The instructions should work exactly the same for gitlab as all of the script components are at the `git` command level.

Dale

On Thu, Nov 10, 2016 at 11:40 AM, Mariano Martinez Peck <[hidden email]> wrote:

On Wed, Nov 9, 2016 at 6:47 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On Wed, Nov 9, 2016 at 6:35 PM, Dale Henrichs <[hidden email]> wrote:



On 11/9/16 1:35 PM, Mariano Martinez Peck via Glass wrote:
 
2) Say I do want to commit all that directory into my own git fork. Where in gsDevKit_home configuration  can I tell it which URL/branch should be used for GsDevKit/GsDevKit_sys_local ?

First you will add a remote pointing at your fork of the project on Github:

  git remote add mine [hidden email]:marianopeck/GsDevKit_sys_local.git

Then you will create the file $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env with the following contents:

  export GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT=mine
  export GSDEVKIT_SYS_LOCAL_GIT_REMOTE=<branch-name>

You will want to create a unique branch in your fork to manage your changes, so that you can keep the master branch clean for updates.

updateGsDevKit will:
  1. git checkout master
  2. git pull origin master
  3. git checkout <branch-name>
  4. git merge master


Hi Dale,

Thanks for your answer. I got it.  Now I wonder... would the above instructions also work if I use gitlab instead of github? (I want the project to be private).

Thanks in advance 




--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Where should I put my own bash scripts in GsDevKit_home?

GLASS mailing list
In reply to this post by GLASS mailing list


On Wed, Nov 9, 2016 at 6:47 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On Wed, Nov 9, 2016 at 6:35 PM, Dale Henrichs <[hidden email]> wrote:



On 11/9/16 1:35 PM, Mariano Martinez Peck via Glass wrote:
 
2) Say I do want to commit all that directory into my own git fork. Where in gsDevKit_home configuration  can I tell it which URL/branch should be used for GsDevKit/GsDevKit_sys_local ?

First you will add a remote pointing at your fork of the project on Github:

  git remote add mine [hidden email]:marianopeck/GsDevKit_sys_local.git

Then you will create the file $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env with the following contents:

  export GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT=mine
  export GSDEVKIT_SYS_LOCAL_GIT_REMOTE=<branch-name>



Hi Dale,

Is this still accurate? I cannot see neither defGsDevKit nor the variable. I do see defSharedGitDevKit.env  but grep shows nothing. Any idea?

I am on gs_port

Thanks in advance,







 
You will want to create a unique branch in your fork to manage your changes, so that you can keep the master branch clean for updates.

updateGsDevKit will:
  1. git checkout master
  2. git pull origin master
  3. git checkout <branch-name>
  4. git merge master

Dale


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Where should I put my own bash scripts in GsDevKit_home?

GLASS mailing list



On 01/30/2017 07:08 PM, Mariano Martinez Peck wrote:


On Wed, Nov 9, 2016 at 6:47 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On Wed, Nov 9, 2016 at 6:35 PM, Dale Henrichs <[hidden email]> wrote:



On 11/9/16 1:35 PM, Mariano Martinez Peck via Glass wrote:
 
2) Say I do want to commit all that directory into my own git fork. Where in gsDevKit_home configuration  can I tell it which URL/branch should be used for GsDevKit/GsDevKit_sys_local ?

First you will add a remote pointing at your fork of the project on Github:

  git remote add mine [hidden email]GsDevKit_sys_local.git

Then you will create the file $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env with the following contents:

  export GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT=mine
  export GSDEVKIT_SYS_LOCAL_GIT_REMOTE=<branch-name>



Hi Dale,

Is this still accurate? I cannot see neither defGsDevKit nor the variable. I do see defSharedGitDevKit.env  but grep shows nothing. Any idea?

Yes this is accurate.

Look at $GS_HOME/shared/bin/defGsDevKit.env and you will see that $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env is conditionally `sourced`.

The env vars  GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT and GSDEVKIT_SYS_LOCAL_GIT_REMOTE are used in $GS_HOME/bin/updateGsDevKit so that your checkout/branch will be used instead of the defaults ...

I do think that I reversed the values for the env vars. It should have been:

  export GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT=<branch-name>
  export GSDEVKIT_SYS_LOCAL_GIT_REMOTE=mine

Dale


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Where should I put my own bash scripts in GsDevKit_home?

GLASS mailing list


On Tue, Jan 31, 2017 at 1:33 PM, Dale Henrichs <[hidden email]> wrote:



On 01/30/2017 07:08 PM, Mariano Martinez Peck wrote:


On Wed, Nov 9, 2016 at 6:47 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On Wed, Nov 9, 2016 at 6:35 PM, Dale Henrichs <[hidden email]> wrote:



On 11/9/16 1:35 PM, Mariano Martinez Peck via Glass wrote:
 
2) Say I do want to commit all that directory into my own git fork. Where in gsDevKit_home configuration  can I tell it which URL/branch should be used for GsDevKit/GsDevKit_sys_local ?

First you will add a remote pointing at your fork of the project on Github:

  git remote add mine [hidden email]GsDevKit_sys_local.git

Then you will create the file $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env with the following contents:

  export GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT=mine
  export GSDEVKIT_SYS_LOCAL_GIT_REMOTE=<branch-name>



Hi Dale,

Is this still accurate? I cannot see neither defGsDevKit nor the variable. I do see defSharedGitDevKit.env  but grep shows nothing. Any idea?

Yes this is accurate.

Look at $GS_HOME/shared/bin/defGsDevKit.env and you will see that $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env is conditionally `sourced`.

Sorry, but I am not seeing the same (I am on gs_port just in case). In my clone `$GS_HOME/shared/bin/defGsDevKit.env` they are conditionally sourced either of `defSharedRepoDevKit.env` or `defSharedGitDevKit.env`. But not `defGsDevKit.env`.

I think you mean that I should look at `$GS_HOME/sys/bin/defGsDevKit.env`  ( that is... s/shared/sys) and then yes, I see it.  I am just noting this for possible future readers of this thread.



The env vars  GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT and GSDEVKIT_SYS_LOCAL_GIT_REMOTE are used in $GS_HOME/bin/updateGsDevKit so that your checkout/branch will be used instead of the defaults ...


OK, good, now `grep` did find those. 

 
I do think that I reversed the values for the env vars. It should have been:

  export GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT=<branch-name>
  export GSDEVKIT_SYS_LOCAL_GIT_REMOTE=mine


Yes, that's the way they should be!

Thanks Dale
 
Dale




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: Where should I put my own bash scripts in GsDevKit_home?

GLASS mailing list



On 01/31/2017 09:54 AM, Mariano Martinez Peck wrote:


On Tue, Jan 31, 2017 at 1:33 PM, Dale Henrichs <[hidden email]> wrote:



On 01/30/2017 07:08 PM, Mariano Martinez Peck wrote:


On Wed, Nov 9, 2016 at 6:47 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On Wed, Nov 9, 2016 at 6:35 PM, Dale Henrichs <[hidden email]> wrote:



On 11/9/16 1:35 PM, Mariano Martinez Peck via Glass wrote:
 
2) Say I do want to commit all that directory into my own git fork. Where in gsDevKit_home configuration  can I tell it which URL/branch should be used for GsDevKit/GsDevKit_sys_local ?

First you will add a remote pointing at your fork of the project on Github:

  git remote add mine [hidden email]GsDevKit_sys_local.git

Then you will create the file $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env with the following contents:

  export GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT=mine
  export GSDEVKIT_SYS_LOCAL_GIT_REMOTE=<branch-name>



Hi Dale,

Is this still accurate? I cannot see neither defGsDevKit nor the variable. I do see defSharedGitDevKit.env  but grep shows nothing. Any idea?

Yes this is accurate.

Look at $GS_HOME/shared/bin/defGsDevKit.env and you will see that $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env is conditionally `sourced`.

Sorry, but I am not seeing the same (I am on gs_port just in case). In my clone `$GS_HOME/shared/bin/defGsDevKit.env` they are conditionally sourced either of `defSharedRepoDevKit.env` or `defSharedGitDevKit.env`. But not `defGsDevKit.env`.

I think you mean that I should look at `$GS_HOME/sys/bin/defGsDevKit.env`  ( that is... s/shared/sys) and then yes, I see it.  I am just noting this for possible future readers of this thread.
You are right ... $GS_HOME/sys/bin/defGsDevKit.env is where $GS_HOME/sys/local/gsdevkit_bin/defGsDevKit.env is sourced ...



The env vars  GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT and GSDEVKIT_SYS_LOCAL_GIT_REMOTE are used in $GS_HOME/bin/updateGsDevKit so that your checkout/branch will be used instead of the defaults ...


OK, good, now `grep` did find those. 

 
I do think that I reversed the values for the env vars. It should have been:

  export GSDEVKIT_SYS_LOCAL_GIT_CHECKOUT=<branch-name>
  export GSDEVKIT_SYS_LOCAL_GIT_REMOTE=mine


Yes, that's the way they should be!

Thanks Dale
 
Dale




--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass