Skip to content

Commit

Permalink
Add shell script to install packages (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx authored Sep 21, 2024
1 parent 9d87d87 commit d81aad1
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions utilix/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

set -e

# List of packages
packages=( "$@" )

# Loop through each package
for package in "${packages[@]}"
do
# Check if the tarball exists
if [ ! -f "$package.tar.gz" ]; then
echo "Tarball $package.tar.gz not found. Skipping $package."
echo
continue
fi

echo "Installing $package:"

# Create a directory for the package
mkdir -p $package

# Extract the tarball to the package directory
tar -xzf $package.tar.gz -C $package --strip-components=1

# Install the package in very quiet mode by -qq
pip install ./$package --user --no-deps -qq

echo "$package installation complete."
echo
done


# Loop through each package
for package in "${packages[@]}"
do
# Verify the installation by importing the package
python -c "import $package; print($package.__file__); print($package.__version__)"

echo "$package validation complete."
echo
done

0 comments on commit d81aad1

Please sign in to comment.