Merge pull request #12 from gabrielecabrini/patch-4

This commit is contained in:
Lakr
2024-07-04 02:48:32 +08:00
committed by GitHub

19
make.sh
View File

@@ -49,8 +49,23 @@ popd > /dev/null
pushd lib > /dev/null
echo "[*] patching lib requirements gem..."
# Determine the operating system
OS_TYPE="$(uname -s)"
case "$OS_TYPE" in
Linux*)
sed_i_cmd="sed -i";;
Darwin*)
sed_i_cmd="sed -i ''";;
*)
echo "Unsupported OS: $OS_TYPE";
exit 1;;
esac
# replace `require 'gitlab/license/` with `require 'license/` to make it work
find . -type f -exec sed -i '' 's/require '\''gitlab\/license\//require_relative '\''license\//g' {} \;
find . -type f -exec $sed_i_cmd 's/require '\''gitlab\/license\//require_relative '\''license\//g' {} \;
popd > /dev/null
echo "[*] updated gem"
@@ -103,4 +118,4 @@ LICENSE_JSON_FILE=$BUILD_DIR/license.json
-o $LICENSE_FILE \
--plain-license $LICENSE_JSON_FILE
echo "[*] done $(basename $0)"
echo "[*] done $(basename $0)"