Updated ideenv script

This commit is contained in:
Akash Yadav
2022-06-17 00:19:19 +05:30
parent 4f5c526604
commit 3d47a5a629
+5 -2
View File
@@ -7,7 +7,6 @@ print_help() {
echo ""
echo " -s Show the environment variables"
echo " -e Edit the environment variables"
echo "Executing this command without any arguments opens the editor."
echo ""
}
@@ -16,13 +15,17 @@ PROPS=@PREFIX@/etc/ide-environment.properties
while getopts ":she" option; do
case $option in
s) ## Simply print the contents of the file
if [ ! -f "$PROPS" ]; then
echo "Properties file does not exist."
exit 1
fi
cat $PROPS
echo ""
exit;;
h) ## Show the help
print_help
exit;;
*) ## Open the file in nano editor
e) ## Open the file in nano editor
echo "Opening $PROPS file with nano editor..."
nano $PROPS
exit;;