mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
feat: devcontainer part 4 (#3339)
add utils.sh, prelim docs Signed-off-by: Dave Lee <dave@gray101.com>
This commit is contained in:
parent
6aba6223c7
commit
9cfd89087b
2 changed files with 61 additions and 7 deletions
|
@ -7,14 +7,19 @@ If files with those names exist here, they will be called at the end of the norm
|
|||
|
||||
This is a good place to set things like `git config --global user.name` are set - and to handle any other files that are mounted via this directory.
|
||||
|
||||
An example of a useful script might be:
|
||||
To assist in doing so, `source /.devcontainer-scripts/utils.sh` will provide utility functions that may be useful - for example:
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
gcn=$(git config --global user.name)
|
||||
if [ -z "$gcn" ]; then
|
||||
git config --global user.name YOUR.NAME
|
||||
git config --global user.email YOUR.EMAIL
|
||||
git remote add PREFIX FORK_URL
|
||||
fi
|
||||
|
||||
source "/.devcontainer-scripts/utils.sh"
|
||||
|
||||
sshfiles=("config", "key.pub")
|
||||
|
||||
setup_ssh "${sshfiles[@]}"
|
||||
|
||||
config_user "YOUR NAME" "YOUR EMAIL"
|
||||
|
||||
config_remote "REMOTE NAME" "REMOTE URL"
|
||||
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue