mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
Smarter version detection
This commit is contained in:
parent
6090507c4c
commit
353adc8b45
@ -23,6 +23,26 @@ $BASH_BLOCK"
|
|||||||
|
|
||||||
# Let's get started!
|
# Let's get started!
|
||||||
clear
|
clear
|
||||||
|
if [ -f $PROFILE ]
|
||||||
|
then
|
||||||
|
if [ "$(grep PANDA_VERSION=$PANDA_VERSION $PROFILE)" != "" ]
|
||||||
|
then
|
||||||
|
echo "It looks like your version of Panda3D is already configured!"
|
||||||
|
echo ""
|
||||||
|
echo "Exiting. You can close this window."
|
||||||
|
echo ""
|
||||||
|
exit
|
||||||
|
elif [ "$(grep 'PANDA_VERSION=[0-9].[0-9].[0-9]' $PROFILE)" != "" ]
|
||||||
|
then
|
||||||
|
$(sed s@PANDA_VERSION=[0-9].[0-9].[0-9]@PANDA_VERSION=$PANDA_VERSION@ -i $PROFILE)
|
||||||
|
echo "Success! Your version of Panda3D has been changed to $PANDA_VERSION."
|
||||||
|
echo ""
|
||||||
|
echo "All done! You can close this window."
|
||||||
|
echo ""
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "This script will attempt to look at your BASH profile and add"
|
echo "This script will attempt to look at your BASH profile and add"
|
||||||
echo "appropriate entries so that Panda3D will work for you. This means"
|
echo "appropriate entries so that Panda3D will work for you. This means"
|
||||||
echo "adding the following to $PROFILE :"
|
echo "adding the following to $PROFILE :"
|
||||||
@ -51,6 +71,7 @@ fi
|
|||||||
|
|
||||||
if [ "$(grep -i panda3d $PROFILE)" != "" ]
|
if [ "$(grep -i panda3d $PROFILE)" != "" ]
|
||||||
then
|
then
|
||||||
|
echo "Your profile already has some reference to 'panda3d'!"
|
||||||
echo "It looks like you might already have the paths set up. If you're"
|
echo "It looks like you might already have the paths set up. If you're"
|
||||||
echo "upgrading, might just need to change PANDA_VERSION to $PANDA_VERSION"
|
echo "upgrading, might just need to change PANDA_VERSION to $PANDA_VERSION"
|
||||||
echo ""
|
echo ""
|
||||||
@ -89,3 +110,4 @@ else
|
|||||||
echo "All done! You can close this window."
|
echo "All done! You can close this window."
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user