Fix handle for missing depends to include make
This commit is contained in:
parent
747721bf11
commit
da139eb646
|
@ -12,6 +12,11 @@ if ! command -v curl &> /dev/null; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! command -v make &> /dev/null; then
|
||||||
|
echo "make is not installed. Please install make first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d "$HOME/.rbenv" ]; then
|
if [ ! -d "$HOME/.rbenv" ]; then
|
||||||
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
|
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
|
||||||
cd ~/.rbenv && src/configure && make -C src
|
cd ~/.rbenv && src/configure && make -C src
|
||||||
|
@ -36,6 +41,12 @@ fi
|
||||||
echo "Fetching latest Ruby versions..."
|
echo "Fetching latest Ruby versions..."
|
||||||
VERSIONS=$(rbenv install -l 2>/dev/null | grep -E "^\s*\d+\.\d+\.\d+$" | tail -n 5)
|
VERSIONS=$(rbenv install -l 2>/dev/null | grep -E "^\s*\d+\.\d+\.\d+$" | tail -n 5)
|
||||||
|
|
||||||
|
# Check if VERSIONS is empty
|
||||||
|
if [ -z "$VERSIONS" ]; then
|
||||||
|
echo "No Ruby versions found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Present the user with options
|
# Present the user with options
|
||||||
echo "Please select a Ruby version to install:"
|
echo "Please select a Ruby version to install:"
|
||||||
select VERSION in $VERSIONS; do
|
select VERSION in $VERSIONS; do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user