Changed exit codes of dialogue to change the semantics of closing dialogue window with (x) button.
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
# fake-icfs_dialogue: script that mocks the behavior of icfs_dialogue based on the ./.fake-icfs_dialogue-response file
|
||||
|
||||
ICFS_DIALOGUE_YES=0
|
||||
ICFS_DIALOGUE_NO=1
|
||||
ICFS_DIALOGUE_YES=1
|
||||
ICFS_DIALOGUE_NO=0
|
||||
ICFS_DIALOGUE_PERM=2
|
||||
ICFS_DIALOGUE_TEMP=0
|
||||
|
||||
if [[ $1 == "--set-fake-response" ]]; then
|
||||
#someone knows we are fake :)
|
||||
@@ -27,9 +28,9 @@ else
|
||||
fi
|
||||
|
||||
if [[ $FAKE_ICFS_DIALOGUE_RESPONSE == "yes" ]]; then
|
||||
exit "$ICFS_DIALOGUE_YES"
|
||||
exit "$((ICFS_DIALOGUE_YES | ICFS_DIALOGUE_TEMP))"
|
||||
elif [[ $FAKE_ICFS_DIALOGUE_RESPONSE == "no" ]]; then
|
||||
exit "$ICFS_DIALOGUE_NO"
|
||||
exit "$((ICFS_DIALOGUE_NO | ICFS_DIALOGUE_TEMP))"
|
||||
elif [[ $FAKE_ICFS_DIALOGUE_RESPONSE == "yes_perm" ]]; then
|
||||
exit "$((ICFS_DIALOGUE_YES | ICFS_DIALOGUE_PERM))"
|
||||
elif [[ $FAKE_ICFS_DIALOGUE_RESPONSE == "no_perm" ]]; then
|
||||
|
Reference in New Issue
Block a user