s
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
# herolib
|
||||
|
||||
a smaller version of herolib with only the items we need for hero
|
||||
|
||||
> [documentation here](https://freeflowuniverse.github.io/herolib/)
|
||||
> [documentation of the library](https://freeflowuniverse.github.io/herolib/)
|
||||
|
||||
## hero install
|
||||
## hero install for users
|
||||
|
||||
```bash
|
||||
curl https://raw.githubusercontent.com/freeflowuniverse/herolib/refs/heads/development_kristof10/install_hero.sh > /tmp/install_hero.sh
|
||||
@@ -12,7 +11,9 @@ bash /tmp/install_hero.sh
|
||||
|
||||
```
|
||||
|
||||
## automated install
|
||||
this tool can be used to work with git, build books, play with hero AI, ...
|
||||
|
||||
## automated install for developers
|
||||
|
||||
```bash
|
||||
curl 'https://raw.githubusercontent.com/freeflowuniverse/herolib/refs/heads/main/install_v.sh' > /tmp/install_v.sh
|
||||
|
||||
@@ -18,7 +18,41 @@ else
|
||||
fi
|
||||
|
||||
if [[ "${OSNAME}" == "darwin"* ]]; then
|
||||
[ -f /usr/local/bin/hero ] && rm /usr/local/bin/hero
|
||||
# Check if /usr/local/bin/hero exists and remove it
|
||||
if [ -f /usr/local/bin/hero ]; then
|
||||
rm /usr/local/bin/hero || { echo "Error: Failed to remove existing hero binary"; exit 1; }
|
||||
fi
|
||||
|
||||
# Check if brew is installed
|
||||
if ! command -v brew &> /dev/null; then
|
||||
echo "Homebrew is required but not installed."
|
||||
read -p "Would you like to install Homebrew? (y/n) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Installing Homebrew..."
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || {
|
||||
echo "Error: Failed to install Homebrew"
|
||||
exit 1
|
||||
}
|
||||
else
|
||||
echo "Homebrew is required to continue. Installation aborted."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update Homebrew
|
||||
echo "Updating Homebrew..."
|
||||
if ! brew update; then
|
||||
echo "Error: Failed to update Homebrew. Please check your internet connection and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Upgrade Homebrew packages
|
||||
echo "Upgrading Homebrew packages..."
|
||||
if ! brew upgrade; then
|
||||
echo "Error: Failed to upgrade Homebrew packages. Please check your internet connection and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$url" ]; then
|
||||
|
||||
@@ -31,7 +31,7 @@ pub fn (mut repo GitRepo) status_update(args StatusUpdateArgs) ! {
|
||||
// Load repo information
|
||||
// Does not check cache, it is the callers responsibility to check cache and load accordingly.
|
||||
fn (mut repo GitRepo) load() ! {
|
||||
console.print_debug('load ${repo.cache_key()}')
|
||||
console.print_header('load ${repo.cache_key()}')
|
||||
repo.init() or {
|
||||
return error('Failed to initialize repo during load operation: ${err}')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user