From 24f52003227077dedfa4cab73a178dc441ef4e26 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sun, 11 Aug 2024 13:51:35 +0200 Subject: [PATCH] don't repeat ~/ --- dist/setup-x48ng-home.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dist/setup-x48ng-home.sh b/dist/setup-x48ng-home.sh index d1a6fa3..bd5d699 100755 --- a/dist/setup-x48ng-home.sh +++ b/dist/setup-x48ng-home.sh @@ -1,21 +1,20 @@ #!/usr/bin/env sh -DOTX48NG=${DOTX48NG:-.config/x48ng} -CONFIG_FILE=~/"${DOTX48NG}"/config.lua +DOTX48NG=${DOTX48NG:-~/.config/x48ng} +CONFIG_FILE="${DOTX48NG}"/config.lua ROM=${ROM:-./ROMs/gxrom-r} -# [ -d ~/"${DOTX48NG}" ] && rm -fr ~"/${DOTX48NG}" -mkdir -p ~/"${DOTX48NG}" +mkdir -p "${DOTX48NG}" [ -e "${CONFIG_FILE}" ] && mv "${CONFIG_FILE}" "${CONFIG_FILE}".orig x48ng --print-config > "${CONFIG_FILE}" -cp -r @PREFIX@/share/x48ng/ROMs/ ~/"${DOTX48NG}"/ +cp -r @PREFIX@/share/x48ng/ROMs/ "${DOTX48NG}"/ -cd ~/"${DOTX48NG}"/ROMs/ || exit 1 +cd "${DOTX48NG}"/ROMs/ || exit 1 make get-roms -cd ~/"${DOTX48NG}" || exit 1 +cd "${DOTX48NG}" || exit 1 [ -e rom ] && mv rom rom.orig ln -s "$ROM" rom