2018-03-16 16:48:36 -07:00
|
|
|
#!/bin/bash
|
2018-09-07 13:08:05 -07:00
|
|
|
# Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
#
|
|
|
|
# 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 16:48:36 -07:00
|
|
|
|
|
|
|
# execute command
|
2018-08-21 20:16:41 -07:00
|
|
|
"$@"
|
2018-03-16 16:48:36 -07:00
|
|
|
|
|
|
|
# check status
|
|
|
|
STATUS=$?
|
|
|
|
if [ $STATUS == 0 ]; then
|
2018-08-21 20:16:41 -07:00
|
|
|
echo "Command " "$@" " completed successfully"
|
2018-03-16 16:48:36 -07:00
|
|
|
else
|
2018-08-21 20:16:41 -07:00
|
|
|
echo "Command " "$@" " exited with error status $STATUS"
|
2018-03-16 16:48:36 -07:00
|
|
|
fi
|