Add a script for configuring nvs
This commit is contained in:
parent
89eb9b26b7
commit
cc35f7e065
2 changed files with 23 additions and 5 deletions
14
scripts/Common/Config/NVS/install.sh
Executable file
14
scripts/Common/Config/NVS/install.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
NVS_HOME="${NVS_HOME:-'$HOME/.nvs'}";
|
||||
NVS_PATH="${NVS_PATH}";
|
||||
|
||||
profilePath="/etc/profile.d/nvs-home.sh";
|
||||
|
||||
{
|
||||
echo "NVS_HOME=\"$NVS_HOME\"";
|
||||
echo "source \"$NVS_PATH/nvs.sh\"";
|
||||
} | sudo tee "$profilePath" > /dev/null;
|
||||
|
||||
source "$profilePath";
|
||||
nvs add latest;
|
||||
nvs link latest;
|
|
@ -1,7 +1,11 @@
|
|||
#!/bin/bash
|
||||
export NVS_HOME="$HOME/.nvs";
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
home_expression='$HOME/.nvs';
|
||||
export NVS_HOME="$(bash -c echo $home_expression)";
|
||||
git clone https://github.com/jasongin/nvs "$NVS_HOME";
|
||||
# shellcheck source=~/.nvs/nvs.sh
|
||||
. "$NVS_HOME/nvs.sh" install;
|
||||
bash -c 'exec bash -c "nvs add latest"';
|
||||
bash -c 'exec bash -c "nvs link latest"';
|
||||
|
||||
NVS_HOME="$home_expression" \
|
||||
NVS_PATH="$NVS_HOME" \
|
||||
. "../../Config/NVS/install.sh";
|
||||
|
||||
popd > /dev/null;
|
||||
|
|
Loading…
Reference in a new issue