Skip to content

Commit

Permalink
Add shell script to install packages
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed Sep 21, 2024
1 parent 9d87d87 commit 9f4e23f
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 9f4e23f

Please sign in to comment.