Skip to content

Commit

Permalink
don't repeat ~/
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenhael-le-moine committed Aug 11, 2024
1 parent f1b08f7 commit 24f5200
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dist/setup-x48ng-home.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 24f5200

Please sign in to comment.