Renaming projects site html link
This commit is contained in:
1 parent
7b90abe7ba
commit
63d160f484
9 files changed
+666
-41
No files matched your search
+40
-3
@@ -1,7 +1,44 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
run_powershell_export() {
|
||||
local ps_script="$SCRIPT_DIR/export_code.ps1"
|
||||
|
||||
if command -v pwsh >/dev/null 2>&1; then
|
||||
pwsh -NoLogo -NoProfile -ExecutionPolicy Bypass -File "$ps_script" "$@"
|
||||
return
|
||||
fi
|
||||
|
||||
if command -v powershell.exe >/dev/null 2>&1; then
|
||||
if command -v cygpath >/dev/null 2>&1; then
|
||||
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File "$(cygpath -w "$ps_script")" "$@"
|
||||
else
|
||||
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File "$ps_script" "$@"
|
||||
fi
|
||||
return
|
||||
fi
|
||||
|
||||
echo "PowerShell was not found. Run export_code.ps1 manually." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
case "$(uname -s 2>/dev/null || printf '')" in
|
||||
CYGWIN*|MINGW*|MSYS*)
|
||||
run_powershell_export "$@"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${OS:-}" == "Windows_NT" ]]; then
|
||||
run_powershell_export "$@"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Nastavitev imena izhodne datoteke
|
||||
OUTPUT_FILE="code_export.txt"
|
||||
OUTPUT_FILE="${1:-code_export.txt}"
|
||||
|
||||
# Odstrani izhodno datoteko, če že obstaja, da začnemo s čisto datoteko
|
||||
if [ -f "$OUTPUT_FILE" ]; then
|
||||
@@ -43,7 +80,7 @@ find . -type f \
|
||||
| sort | while read -r file; do
|
||||
|
||||
# Preskoči samo izhodno datoteko in to skripto
|
||||
if [[ "$file" == "./$OUTPUT_FILE" || "$file" == "./export_code.sh" ]]; then
|
||||
if [[ "$file" == "./$OUTPUT_FILE" || "$file" == "./export_code.sh" || "$file" == "./export_code.ps1" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user