mirror of
https://github.com/Lakr233/GitLab-License-Generator.git
synced 2026-01-30 11:55:35 +02:00
Fix make.sh linux support
This commit is contained in:
19
make.sh
19
make.sh
@@ -49,8 +49,23 @@ popd > /dev/null
|
|||||||
|
|
||||||
pushd lib > /dev/null
|
pushd lib > /dev/null
|
||||||
echo "[*] patching lib requirements gem..."
|
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
|
# 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
|
popd > /dev/null
|
||||||
|
|
||||||
echo "[*] updated gem"
|
echo "[*] updated gem"
|
||||||
@@ -103,4 +118,4 @@ LICENSE_JSON_FILE=$BUILD_DIR/license.json
|
|||||||
-o $LICENSE_FILE \
|
-o $LICENSE_FILE \
|
||||||
--plain-license $LICENSE_JSON_FILE
|
--plain-license $LICENSE_JSON_FILE
|
||||||
|
|
||||||
echo "[*] done $(basename $0)"
|
echo "[*] done $(basename $0)"
|
||||||
|
|||||||
Reference in New Issue
Block a user