#!/bin/bash cpu=$(arch) #cpu架构 strinstallpath="" read -p "Enter the path you want to install: " installpath strinstallpath=$installpath"/libusb_install" echo $strinstallpath if [!-d $strinstallpath];then echo "$strinstallpath do not exist,will make dir" mkdir $strinstallpath else echo "$strinstallpath exist" fi ./bootstrap.sh if [ "$cpu" == "loongarch64" ]; then ./configure --build=loongarch64-unknown-linux-gnu --with-pic --prefix=$strinstallpath --enable-static=no --enable-static=yes else ./configure --with-pic --prefix=$strinstallpath --enable-shared=no --enable-static=yes fi echo "configure done!!!!" echo "start to make source code" make -j4 echo "make done" echo "start to make install " make install echo "make install done! installed in "