add --uninstall-libraries to kicad-install.sh
This commit is contained in:
parent
1173eff777
commit
0ca123d255
|
@ -19,8 +19,9 @@ usage()
|
||||||
echo ""
|
echo ""
|
||||||
echo "./kicad-install.sh <cmd>"
|
echo "./kicad-install.sh <cmd>"
|
||||||
echo " where <cmd> is one of:"
|
echo " where <cmd> is one of:"
|
||||||
echo " --install-or-update (does full installation or update.)"
|
echo " --install-or-update (does full installation or update.)"
|
||||||
echo " --remove-sources (removes source trees for another attempt.)"
|
echo " --remove-sources (removes source trees for another attempt.)"
|
||||||
|
echo " --uninstall-libraries (removes KiCad supplied libraries.)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "example:"
|
echo "example:"
|
||||||
echo ' $ ./kicad-install.sh --install-or-update'
|
echo ' $ ./kicad-install.sh --install-or-update'
|
||||||
|
@ -85,6 +86,27 @@ rm_build_dir()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
cmake_uninstall()
|
||||||
|
{
|
||||||
|
# assume caller set the CWD, and is only telling us about it in $1
|
||||||
|
local dir="$1"
|
||||||
|
|
||||||
|
cwd=`pwd`
|
||||||
|
if [ "$cwd" != "$dir" ]; then
|
||||||
|
echo "missing dir $dir"
|
||||||
|
elif [ ! -e install_manifest.txt ]; then
|
||||||
|
echo
|
||||||
|
echo "Missing file $dir/install_manifest.txt."
|
||||||
|
echo "Libraries may have already been uinstalled, or were not"
|
||||||
|
echo 'originally installed with an "uninstall" knowledgable CMakeLists.txt file.'
|
||||||
|
else
|
||||||
|
echo "uninstalling from $dir"
|
||||||
|
sudo make uninstall
|
||||||
|
sudo rm install_manifest.txt
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
install_or_update()
|
install_or_update()
|
||||||
{
|
{
|
||||||
echo "step 1) installing pre-requisites"
|
echo "step 1) installing pre-requisites"
|
||||||
|
@ -202,4 +224,11 @@ if [ $# -eq 1 -a "$1" == "--install-or-update" ]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ $# -eq 1 -a "$1" == "--uninstall-libraries" ]; then
|
||||||
|
cd "$WORKING_TREES/kicad-lib.bzr/build"
|
||||||
|
cmake_uninstall "$WORKING_TREES/kicad-lib.bzr/build"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
usage
|
usage
|
||||||
|
|
Loading…
Reference in New Issue