Fixed #61 : SheerkaDebugManager: Add get_value()
Fixed #60 : Hash error when ReturnValue is a list of list Fixed #59 : Implement smart_get() Fixed #58 : SheerkaPromptCompleter: Cannot parse concept token Fixed #57 : SheerkaPrompt: Add concept autocompletion Fixed #56 : automatically backup command Fixed #54 : I can record execution status Fixed #53 : ConceptManager: modify_concept fails
This commit is contained in:
+30
-4
@@ -1,5 +1,33 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
list_available() {
|
||||
available=$(find $HOME/.sheerka_* -maxdepth 0 -type d | awk -F_ '{ print " "$2}') 2> /dev/null
|
||||
|
||||
if [ "$available" = "" ]; then
|
||||
echo "Error. No available environment !" >&2
|
||||
else
|
||||
echo "Available environment are:"
|
||||
for backup in ${available}; do
|
||||
echo " ${backup}";
|
||||
done
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [environment]"
|
||||
echo "Resetting Sheerka environment from a previously build."
|
||||
echo "If no environment is set, create a fresh install of Sheerka from scratch."
|
||||
list_available
|
||||
exit 0
|
||||
}
|
||||
|
||||
if [ "$1" = "-h" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# No environment provided.
|
||||
# Create a new environment from scratch (by simply removing .sheerka folder)
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "Resetting Sheerka environment."
|
||||
rm -rf ~/.sheerka
|
||||
@@ -8,9 +36,7 @@ fi
|
||||
|
||||
if ! [ -e "$HOME/.sheerka_$1" ]; then
|
||||
echo "$HOME/.sheerka_$1 not found" >&2
|
||||
available=$(ls -d $HOME/.sheerka_* | awk -F_ '{ print " "$2}')
|
||||
echo "Available environments are:"
|
||||
echo "$available"
|
||||
list_available
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user