2018-03-16 23:48:36 +00:00
|
|
|
#!/bin/bash
|
2018-09-11 22:27:47 +00:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
2018-09-07 20:08:05 +00:00
|
|
|
#
|
|
|
|
# This source code is licensed under the MIT license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree.
|
2018-03-16 23:48:36 +00:00
|
|
|
|
|
|
|
# execute command
|
2018-08-22 03:16:41 +00:00
|
|
|
"$@"
|
2018-03-16 23:48:36 +00:00
|
|
|
|
|
|
|
# check status
|
|
|
|
STATUS=$?
|
|
|
|
if [ $STATUS == 0 ]; then
|
2018-08-22 03:16:41 +00:00
|
|
|
echo "Command " "$@" " completed successfully"
|
2018-03-16 23:48:36 +00:00
|
|
|
else
|
2018-08-22 03:16:41 +00:00
|
|
|
echo "Command " "$@" " exited with error status $STATUS"
|
2018-03-16 23:48:36 +00:00
|
|
|
fi
|