diff options
| author | Caroline Larimore <caroline@larimo.re> | 2025-08-18 16:27:00 -0700 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2025-08-18 16:27:00 -0700 |
| commit | 22f992aa5edf39039bc8dd7ef5274dbdd4d777bb (patch) | |
| tree | a4dd572d16bd070614196302efc4b2d631d88f26 | |
| parent | 812ee117f701148046e5018decee8940b634d718 (diff) | |
feat: use data dir for all data
| -rw-r--r-- | .gitignore | 7 | ||||
| -rwxr-xr-x | mcsh.sh | 22 |
2 files changed, 12 insertions, 17 deletions
@@ -1,7 +1,2 @@ -assets -libraries +mcsh logs -natives -run -versions -profiles.json @@ -2,14 +2,14 @@ set -euo pipefail IFS=$'\n\t' -DATA_DIR="." +DATA_DIR="./mcsh" mkdir -p "$DATA_DIR" -VERSIONS_DIR="versions" -LIBRARIES_DIR="libraries" -NATIVES_DIR="natives" -ASSETS_DIR="assets" -GAME_DIR="run" +VERSIONS_DIR="$DATA_DIR/versions" +LIBRARIES_DIR="$DATA_DIR/libraries" +NATIVES_DIR="$DATA_DIR/natives" +ASSETS_DIR="$DATA_DIR/assets" +GAME_DIR="$DATA_DIR/run" function auth ( CLIENT_ID="9e97542c-b7d5-4a02-a656-4559dad4590a" @@ -173,11 +173,11 @@ function launch ( function replace_placeholders { cat - | sed \ - -e "s/\${versions_directory}/$VERSIONS_DIR/g" \ - -e "s/\${libraries_directory}/$LIBRARIES_DIR/g" \ - -e "s/\${natives_directory}/$NATIVES_DIR/g" \ - -e "s/\${assets_root}/$ASSETS_DIR/g" \ - -e "s/\${game_directory}/$GAME_DIR/g" \ + -e "s:\${versions_directory}:$VERSIONS_DIR:g" \ + -e "s:\${libraries_directory}:$LIBRARIES_DIR:g" \ + -e "s:\${natives_directory}:$NATIVES_DIR:g" \ + -e "s:\${assets_root}:$ASSETS_DIR:g" \ + -e "s:\${game_directory}:$GAME_DIR:g" \ \ -e "s/\${launcher_name}/mcsh/g" \ -e "s/\${launcher_version}/v0.1.0/g" \ |