summaryrefslogtreecommitdiff
path: root/pip-to-python-packages.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pip-to-python-packages.sh')
-rwxr-xr-xpip-to-python-packages.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/pip-to-python-packages.sh b/pip-to-python-packages.sh
index c225065..0ade695 100755
--- a/pip-to-python-packages.sh
+++ b/pip-to-python-packages.sh
@@ -7,18 +7,18 @@ python_3_10_packages_path=$HOME/.local/lib/python3.10/site-packages
if [ -d $python3_10_packages_path]; then
echo "Migrating python3.10 pip packages to python-packages"
packages=($(ls $python_3_10_packages_path | uniq | grep -v 'dist-info' | grep -v 'egg-info' | grep -v '__*'))
- for i in "${packages[@]}"; do
+ for packagename in "${packages[@]}"; do
cd $root_path
- if pacman_search_results=$(pacman -Ss python-$i); then
- sudo pacman -S --noconfirm --needed python-$i
+ if pacman_search_results=$(pacman -Ss python-$packagename); then
+ sudo pacman -S --noconfirm --needed python-$packagename
else
- echo "Package 'python-$i' not found in pacman mirrors"
+ echo "Package 'python-$packagename' not found in pacman mirrors"
echo "Searching the AUR..."
- aur_search_results=$(curl -s -X GET "https://aur.archlinux.org/rpc/?v=5&type=info&arg=python-$i" | jq -r '.resultcount')
+ aur_search_results=$(curl -s -X GET "https://aur.archlinux.org/rpc/?v=5&type=info&arg=python-$packagename" | jq -r '.resultcount')
if [[ "$aur_search_results" -eq 1 ]]; then
- git clone "https://aur.archlinux.org/python-$i.git" ./.cache/python-$i && cd ./.cache/python-$i && sudo makepkg --needed --noconfirm -si
+ git clone "https://aur.archlinux.org/python-$packagename.git" ./.cache/python-$packagename && cd ./.cache/python-$packagename && makepkg --needed --noconfirm -si
else
- echo "Package 'python-$i' not found in the AUR. You're on your own for this one."
+ echo "Package 'python-$packagename' not found in the AUR. You're on your own for this one."
fi
fi
done