fix: small fixes
This commit is contained in:
+4
-3
@@ -1,3 +1,4 @@
|
||||
h2path
|
||||
*.patch*
|
||||
*test*
|
||||
*
|
||||
!h2mm
|
||||
!install.sh
|
||||
!README.md
|
||||
@@ -3,6 +3,7 @@
|
||||
# TODO:
|
||||
# export mods
|
||||
# import mods
|
||||
# reset all
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
@@ -49,8 +50,7 @@ function find_game_directory() {
|
||||
fi
|
||||
|
||||
echo "$game_dir" > "$H2PATH"
|
||||
echo -e "Game directory ${GREEN}saved{$NC} to: $H2PATH" >&2
|
||||
echo "--- /// ---" >&2
|
||||
echo -e "Game directory ${GREEN}saved${NC}: $game_dir" >&2
|
||||
echo "$game_dir"
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ function initialize_directories() {
|
||||
echo "Database file created at: $DB_FILE"
|
||||
fi
|
||||
|
||||
echo "--- /// MODS /// ---" >&2
|
||||
echo "--- /// MAIN /// ---" >&2
|
||||
}
|
||||
|
||||
function display_help() {
|
||||
@@ -71,15 +71,19 @@ function display_help() {
|
||||
echo "Usage: h2mm [command] [options]"
|
||||
echo "Commands:"
|
||||
echo " install -n \"<mod_name>\" <mod_files> Install a mod with a name and files."
|
||||
echo " list List all installed mods."
|
||||
echo " uninstall -n \"<mod_name>\" Uninstall a mod by name."
|
||||
echo " list List all installed mods."
|
||||
echo " export \"<zip_name>\" Export installed mods to a zip file (not yet implemented)."
|
||||
echo " import \"<zip_name>\" Import mods from a zip file (not yet implemented)."
|
||||
echo " reset Reset all installed mods (not yet implemented)."
|
||||
echo " help Display this help message."
|
||||
echo "For more information, use h2mm [command] --help, available for install and uninstall."
|
||||
echo "For more information on usage, use h2mm [command] --help, available for install and uninstall."
|
||||
echo "Basic Usage:"
|
||||
echo " h2mm install -n \"Example mod\" a5f2c029522e6714.patch_0 a5f2c029522e6714.patch_0.stream"
|
||||
echo " h2mm uninstall -n \"Example mod\""
|
||||
echo "Advanced Usage:"
|
||||
echo " Database of mods is stored in Steam/steamapps/common/Helldivers\ 2/data/mods.csv"
|
||||
echo " You can rename, delete, or edit this file to manage mods manually."
|
||||
}
|
||||
|
||||
function display_install_help() {
|
||||
@@ -111,6 +115,11 @@ function install_mod() {
|
||||
local mod_files=()
|
||||
local mod_dir=""
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
display_install_help
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
@@ -205,6 +214,11 @@ function uninstall_mod() {
|
||||
local mod_name=""
|
||||
local mod_index=""
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
display_uninstall_help
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
@@ -310,6 +324,12 @@ case "$command" in
|
||||
uninstall_mod "$@"
|
||||
echo "--- /// END /// ---"
|
||||
;;
|
||||
export)
|
||||
echo "Exporting mods to a zip file is not yet implemented."
|
||||
;;
|
||||
import)
|
||||
echo "Importing mods from a zip file is not yet implemented."
|
||||
;;
|
||||
*)
|
||||
display_help
|
||||
;;
|
||||
|
||||
+1
-1
@@ -18,4 +18,4 @@ if [[ ! -x "$(command -v $SCRIPT_NAME)" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Helldivers 2 Mod Manager CLI installed successfully to $DESTINATION_PATH/$SCRIPT_NAME."
|
||||
echo "Helldivers 2 Mod Manager CLI installed successfully to $DESTINATION_PATH/$SCRIPT_NAME. Use it by running '$SCRIPT_NAME'."
|
||||
|
||||
Reference in New Issue
Block a user