Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ keywords = ["core blockchain", "xcb", "cli"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/core-coin/core-cli"
repository = "https://github.com/core-coin/core-cli"
version = "0.0.5"
version = "0.0.6"

[workspace.dependencies]
# Workspace members
Expand Down
15 changes: 14 additions & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,21 @@ main() {
# Add the .core-cli directory to the PATH
case "$_ostype" in
linux|darwin)
if ! grep -q "$core_cli_dir" "$HOME/.profile"; then
profile_files=("$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zshrc")
profile_file_found=false
for profile_file in "${profile_files[@]}"; do
if [ -f "$profile_file" ]; then
profile_file_found=true
if ! grep -q "$core_cli_dir" "$profile_file"; then
echo "export PATH=\$PATH:$core_cli_dir" >> "$profile_file"
export PATH=$PATH:$core_cli_dir
fi
fi
done
if [ "$profile_file_found" = false ]; then
touch "$HOME/.profile"
echo "export PATH=\$PATH:$core_cli_dir" >> "$HOME/.profile"
export PATH=$PATH:$core_cli_dir
fi
;;
windows)
Expand Down
Loading