67 changed files with 440 additions and 232 deletions
@ -0,0 +1,30 @@ |
|||
{ |
|||
"name": "BASH Dev Container", |
|||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", |
|||
"features": { |
|||
"ghcr.io/devcontainers-community/npm-features/prettier:1": { |
|||
"plugins": "prettier-plugin-sh" |
|||
}, |
|||
"ghcr.io/devcontainers-extra/features/actionlint:1": {}, |
|||
"ghcr.io/devcontainers-extra/features/checkov:1": {}, |
|||
"ghcr.io/devcontainers-extra/features/markdownlint-cli:1": {}, |
|||
"ghcr.io/devcontainers-extra/features/shellcheck:1": {}, |
|||
"ghcr.io/devcontainers-extra/features/yamllint:2": {}, |
|||
"ghcr.io/devcontainers/features/github-cli:1": {} |
|||
}, |
|||
"customizations": { |
|||
"vscode": { |
|||
"extensions": [ |
|||
"DavidAnson.vscode-markdownlint", |
|||
"editorconfig.editorconfig", |
|||
"esbenp.prettier-vscode", |
|||
"github.vscode-github-actions", |
|||
"GitHub.vscode-pull-request-github", |
|||
"redhat.vscode-yaml", |
|||
"timonwong.shellcheck", |
|||
"yzhang.markdown-all-in-one" |
|||
] |
|||
} |
|||
}, |
|||
"postCreateCommand": "npm init -y >/dev/null 2>&1 || true && npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template" |
|||
} |
|||
@ -1,28 +1,17 @@ |
|||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. |
|||
# Atom: Please assure your Atom's config setting Tab Type is set to auto, otherwise Atom-EditorConfig may not work as expected. Also disable whitespace package. |
|||
# http://editorconfig.org/ |
|||
|
|||
root = true |
|||
|
|||
[*] |
|||
charset = utf-8 |
|||
indent_style = tab |
|||
indent_size = 4 |
|||
trim_trailing_whitespace = true |
|||
end_of_line = lf |
|||
insert_final_newline = true |
|||
|
|||
# YAML Files |
|||
[*.{yml,yaml}] |
|||
indent_size = 2 |
|||
indent_style = space |
|||
|
|||
# JSON Files |
|||
[*.{json,json5,webmanifest}] |
|||
indent_size = 2 |
|||
indent_style = space |
|||
insert_final_newline = true |
|||
trim_trailing_whitespace = true |
|||
|
|||
# BASH Files |
|||
[*.{.sh}] |
|||
indent_style = tab |
|||
indent_size = 4 |
|||
indent_style = tab |
|||
|
|||
@ -1,12 +1,2 @@ |
|||
# These are supported funding model platforms |
|||
|
|||
github: dgibbs64 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] |
|||
patreon: dgibbs # Replace with a single Patreon username |
|||
open_collective: # Replace with a single Open Collective username |
|||
ko_fi: # Replace with a single Ko-fi username |
|||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel |
|||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry |
|||
liberapay: # Replace with a single Liberapay username |
|||
issuehunt: # Replace with a single IssueHunt username |
|||
otechie: # Replace with a single Otechie username |
|||
custom: # Replace with a single custom sponsorship URL |
|||
github: dgibbs64 |
|||
patreon: dgibbs |
|||
|
|||
@ -1,8 +1,11 @@ |
|||
# Set update schedule for GitHub Actions |
|||
version: 2 |
|||
updates: |
|||
- package-ecosystem: "github-actions" |
|||
directory: "/" |
|||
schedule: |
|||
# Check for updates to GitHub Actions every weekday |
|||
interval: "daily" |
|||
interval: "weekly" |
|||
|
|||
- package-ecosystem: "devcontainers" |
|||
directory: "/" |
|||
schedule: |
|||
interval: weekly |
|||
|
|||
@ -0,0 +1,36 @@ |
|||
name: Prettier |
|||
|
|||
on: |
|||
workflow_dispatch: |
|||
push: |
|||
branches: |
|||
- "*" |
|||
|
|||
concurrency: |
|||
group: prettier-${{ github.ref }} |
|||
cancel-in-progress: true |
|||
|
|||
permissions: |
|||
contents: write |
|||
|
|||
jobs: |
|||
prettier: |
|||
runs-on: ubuntu-latest |
|||
|
|||
steps: |
|||
- name: Checkout |
|||
uses: actions/checkout@v5 |
|||
with: |
|||
persist-credentials: false |
|||
|
|||
- name: Install Prettier and plugins |
|||
run: | |
|||
npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template |
|||
|
|||
- name: Prettify code |
|||
uses: creyD/[email protected] |
|||
with: |
|||
prettier_plugins: "prettier-plugin-sh prettier-plugin-jinja-template" |
|||
prettier_options: --write . |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
commit_message: "chore(prettier): format code" |
|||
@ -0,0 +1,51 @@ |
|||
name: Super Linter |
|||
|
|||
on: |
|||
workflow_dispatch: |
|||
push: |
|||
branches: |
|||
- "*" |
|||
|
|||
concurrency: |
|||
group: super-linter-${{ github.ref }} |
|||
cancel-in-progress: true |
|||
|
|||
permissions: {} |
|||
|
|||
jobs: |
|||
build: |
|||
name: Lint |
|||
runs-on: ubuntu-latest |
|||
|
|||
permissions: |
|||
contents: read |
|||
packages: read |
|||
# To report GitHub Actions status checks |
|||
statuses: write |
|||
|
|||
steps: |
|||
- name: Checkout code |
|||
uses: actions/checkout@v5 |
|||
with: |
|||
# super-linter needs the full git history to get the |
|||
# list of files that changed across commits |
|||
fetch-depth: 0 |
|||
persist-credentials: false |
|||
|
|||
- name: Install Prettier plugins (for summary formatting) |
|||
run: | |
|||
npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template || true |
|||
|
|||
- name: Super-linter |
|||
uses: super-linter/super-linter@v8 |
|||
env: |
|||
# To report GitHub Actions status checks |
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|||
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false |
|||
VALIDATE_JSCPD: false |
|||
VALIDATE_JSON_PRETTIER: false |
|||
VALIDATE_MARKDOWN_PRETTIER: false |
|||
VALIDATE_NATURAL_LANGUAGE: false |
|||
VALIDATE_SHELL_SHFMT: false |
|||
VALIDATE_TERRAFORM_TERRASCAN: false |
|||
VALIDATE_YAML_PRETTIER: false |
|||
@ -0,0 +1,29 @@ |
|||
name: Update copyright year(s) in license file |
|||
|
|||
on: |
|||
workflow_dispatch: |
|||
schedule: |
|||
- cron: "0 3 1 1 *" # 03:00 AM on January 1 |
|||
|
|||
permissions: |
|||
contents: write |
|||
|
|||
jobs: |
|||
update-license-year: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: Checkout |
|||
uses: actions/checkout@v5 |
|||
with: |
|||
fetch-depth: 0 |
|||
persist-credentials: false |
|||
- name: Action Update License Year |
|||
uses: FantasticFiasco/action-update-license-year@v3 |
|||
with: |
|||
token: ${{ secrets.GITHUB_TOKEN }} |
|||
path: LICENSE.md |
|||
- name: Merge pull request |
|||
env: |
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|||
run: | |
|||
gh pr merge --merge --delete-branch |
|||
@ -1,2 +1,11 @@ |
|||
.vscode/settings.json |
|||
/node_modules |
|||
# Visual Studio Code |
|||
.vscode/* |
|||
!.vscode/tasks.json |
|||
!.vscode/launch.json |
|||
!.vscode/extensions.json |
|||
!.vscode/*.code-snippets |
|||
.history/ |
|||
*.vsix |
|||
|
|||
# Node.js |
|||
node_modules |
|||
|
|||
@ -0,0 +1,3 @@ |
|||
{ |
|||
"plugins": ["prettier-plugin-sh"] |
|||
} |
|||
@ -0,0 +1 @@ |
|||
disable=SC2154 |
|||
@ -1,10 +1,12 @@ |
|||
{ |
|||
"recommendations": [ |
|||
"ms-python.python", |
|||
"DavidAnson.vscode-markdownlint", |
|||
"editorconfig.editorconfig", |
|||
"yzhang.markdown-all-in-one", |
|||
"esbenp.prettier-vscode", |
|||
"github.vscode-github-actions", |
|||
"GitHub.vscode-pull-request-github", |
|||
"redhat.vscode-yaml", |
|||
"timonwong.shellcheck", |
|||
"redhat.vscode-yaml" |
|||
"yzhang.markdown-all-in-one" |
|||
] |
|||
} |
|||
|
|||
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 4.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
@ -1,35 +0,0 @@ |
|||
#!/bin/bash |
|||
# LinuxGSM compress_unreal2_maps.sh module |
|||
# Author: Daniel Gibbs |
|||
# Contributors: https://linuxgsm.com/contrib |
|||
# Website: https://linuxgsm.com |
|||
# Description: Compresses unreal maps. |
|||
|
|||
commandname="MAP-COMPRESSOR" |
|||
commandaction="Compressing Maps" |
|||
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|||
fn_firstcommand_set |
|||
|
|||
check.sh |
|||
fn_print_header |
|||
echo -e "Will compress all maps in:" |
|||
echo -e "" |
|||
pwd |
|||
echo -e "" |
|||
echo -e "Compressed maps saved to:" |
|||
echo -e "" |
|||
echo -e "${compressedmapsdir}" |
|||
echo -e "" |
|||
if ! fn_prompt_yn "Start compression?" Y; then |
|||
exitcode=0 |
|||
core_exit.sh |
|||
fi |
|||
mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 |
|||
rm -rfv "${serverfiles:?}/Maps/"*.ut2.uz2 |
|||
cd "${systemdir}" || exit |
|||
for map in "${serverfiles}/Maps/"*; do |
|||
./ucc-bin compress "${map}" --nohomedir |
|||
done |
|||
mv -fv "${serverfiles}/Maps/"*.ut2.uz2 "${compressedmapsdir}" |
|||
|
|||
core_exit.sh |
|||
@ -0,0 +1,80 @@ |
|||
#!/bin/bash |
|||
# LinuxGSM compress_unreal_maps.sh module |
|||
# Author: Daniel Gibbs |
|||
# Contributors: https://linuxgsm.com/contrib |
|||
# Website: https://linuxgsm.com |
|||
# Description: Compresses unreal and unreal2 resources. |
|||
|
|||
commandname="MAP-COMPRESSOR" |
|||
commandaction="Compressing Maps" |
|||
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|||
fn_firstcommand_set |
|||
|
|||
check.sh |
|||
fn_print_header |
|||
echo -e "Will compress all maps in:" |
|||
echo -e "" |
|||
pwd |
|||
echo -e "" |
|||
echo -e "Compressed maps saved to:" |
|||
echo -e "" |
|||
echo -e "${compressedmapsdir}" |
|||
echo -e "" |
|||
totalseconds=3 |
|||
for seconds in {3..1}; do |
|||
fn_print_warn "map compression starting in: ${totalseconds}" |
|||
totalseconds=$((totalseconds - 1)) |
|||
fn_sleep_time_1 |
|||
if [ "${seconds}" == "0" ]; then |
|||
break |
|||
fi |
|||
done |
|||
fn_print_nl |
|||
mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 |
|||
|
|||
# List of extensions to compress |
|||
exts=(ut2 kfm rom u ucl upl int utx uax ukx usx unr umx umod uzx) |
|||
|
|||
# Remove old compressed files using find |
|||
for ext in "${exts[@]}"; do |
|||
mapfile -t oldfiles < <(find "${serverfiles}" -name "*.${ext}.uz2" -type f) |
|||
if [ ${#oldfiles[@]} -gt 0 ]; then |
|||
echo -e "found ${#oldfiles[@]} old compressed file(s) to remove for extension: ${ext}" |
|||
fi |
|||
for file in "${oldfiles[@]}"; do |
|||
if rm -f "$file"; then |
|||
echo -en "removing file [ ${italic}$(basename "$file")${default} ]\c" |
|||
fn_print_ok_eol_nl |
|||
else |
|||
echo -en "removing file [ ${italic}$(basename "$file")${default} ]\c" |
|||
fn_print_fail_eol_nl |
|||
fi |
|||
done |
|||
done |
|||
|
|||
cd "${systemdir}" || exit |
|||
|
|||
# Find and compress files, then move .uz2 to compressedmapsdir |
|||
for ext in "${exts[@]}"; do |
|||
# Collect all files with the current extension into an array |
|||
mapfile -t files < <(find "${serverfiles}" -name "*.${ext}" -type f) |
|||
for file in "${files[@]}"; do |
|||
echo -en "compressing file [ ${italic}$(basename "$file") -> $(basename "$file").uz2${default} ]\c" |
|||
if ! ./ucc-bin compress "${file}" --nohomedir > /dev/null 2>&1; then |
|||
fn_print_fail_eol_nl |
|||
core_exit.sh |
|||
else |
|||
fn_print_ok_eol_nl |
|||
fi |
|||
|
|||
if ! mv -f "${file}.uz2" "${compressedmapsdir}" > /dev/null 2>&1; then |
|||
echo -en "moving compressed file [ ${italic}$(basename "$file").uz2 -> ${compressedmapsdir}/$(basename "$file").uz2${default} ]\c" |
|||
fn_print_fail_eol_nl |
|||
core_exit.sh |
|||
fi |
|||
done |
|||
done |
|||
|
|||
fn_print_ok_nl "Compression complete: All compressed files moved to: ${compressedmapsdir}" |
|||
|
|||
core_exit.sh |
|||
@ -1,35 +0,0 @@ |
|||
#!/bin/bash |
|||
# LinuxGSM compress_ut99_maps.sh module |
|||
# Author: Daniel Gibbs |
|||
# Contributors: https://linuxgsm.com/contrib |
|||
# Website: https://linuxgsm.com |
|||
# Description: Compresses unreal maps. |
|||
|
|||
commandname="MAP-COMPRESSOR" |
|||
commandaction="Compressing Maps" |
|||
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|||
fn_firstcommand_set |
|||
|
|||
check.sh |
|||
fn_print_header |
|||
echo -e "Will compress all maps in:" |
|||
echo -e "" |
|||
pwd |
|||
echo -e "" |
|||
echo -e "Compressed maps saved to:" |
|||
echo -e "" |
|||
echo -e "${compressedmapsdir}" |
|||
echo -e "" |
|||
if ! fn_prompt_yn "Start compression?" Y; then |
|||
exitcode=0 |
|||
core_exit.sh |
|||
fi |
|||
mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 |
|||
rm -rfv "${serverfiles:?}/Maps/"*.unr.uz |
|||
cd "${systemdir}" || exit |
|||
for map in "${serverfiles}/Maps/"*; do |
|||
./ucc-bin compress "${map}" --nohomedir |
|||
done |
|||
mv -fv "${serverfiles}/Maps/"*.unr.uz "${compressedmapsdir}" |
|||
|
|||
core_exit.sh |
|||
Loading…
Reference in new issue