Skip to content

Instantly share code, notes, and snippets.

@rajiteh
Last active February 4, 2023 01:18
Show Gist options
  • Save rajiteh/d51b864fc5f9fa9aa1420e9a044cee3b to your computer and use it in GitHub Desktop.
Save rajiteh/d51b864fc5f9fa9aa1420e9a044cee3b to your computer and use it in GitHub Desktop.
wine hlds launcher
#!/bin/bash
set -euo pipefail
hlds_bin="/home/wineuser/.wine/drive_c/Counter-Strike/hlds.exe"
function log() {
printf >&2 "%s:\t%s\n" "$(date)" "${@}"
}
if [[ -f "${hlds_bin}" ]]; then
log "Game launcher discovered at ${hlds_bin}"
else
log "Game not found, downloading ... "
fi
log "Launching ..."
exec wine cmd.exe /C "cd /D C:\Counter-Strike\ && hlds.exe -game cstrike -console +map aim_map"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment