|
|
@ -12,14 +12,22 @@ function bootstrap { |
|
|
local temp_dir |
|
|
local temp_dir |
|
|
temp_dir=$(mktemp -d) |
|
|
temp_dir=$(mktemp -d) |
|
|
pushd "$temp_dir" || return 2 |
|
|
pushd "$temp_dir" || return 2 |
|
|
curl --no-progress-meter -O $MAIN_TAR_GZ_URL |
|
|
|
|
|
|
|
|
curl -q -O $MAIN_TAR_GZ_URL |
|
|
tar -xzf main.tar.gz --directory "$DESTINATION" |
|
|
tar -xzf main.tar.gz --directory "$DESTINATION" |
|
|
|
|
|
echo "directory: miaou-bash successfully deployed to $DESTINATION" |
|
|
popd || return 3 |
|
|
popd || return 3 |
|
|
|
|
|
else |
|
|
|
|
|
echo "directory: miaou-bash already deployed!" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
local source_bin="$MIAOU_BASH_DIR/bin/miaou-bash" |
|
|
local source_bin="$MIAOU_BASH_DIR/bin/miaou-bash" |
|
|
local dest_bin="/usr/bin/miaou-bash" |
|
|
local dest_bin="/usr/bin/miaou-bash" |
|
|
cmp -s "$source_bin" "$dest_bin" || cp -f "$source_bin" "$dest_bin" |
|
|
|
|
|
|
|
|
if ! cmp -s "$source_bin" "$dest_bin"; then |
|
|
|
|
|
cp -f "$source_bin" "$dest_bin" |
|
|
|
|
|
echo "executable: /usr/bin/miaou-bash freshly created" |
|
|
|
|
|
else |
|
|
|
|
|
echo "executable: /usr/bin/miaou-bash up-to-date!" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
export MIAOU_BASH_DIR="$DESTINATION/miaou-bash" |
|
|
export MIAOU_BASH_DIR="$DESTINATION/miaou-bash" |
|
|
} |
|
|
} |
|
|
|