[setup-x48ng-home.sh] remove @PREFIX@ and mkcard dependency
This commit is contained in:
parent
79c31d6782
commit
7775d1065c
2 changed files with 12 additions and 9 deletions
2
Makefile
2
Makefile
|
@ -170,7 +170,7 @@ install: all dist/config.lua
|
|||
install -c -m 755 dist/checkrom $(DESTDIR)$(PREFIX)/share/x48ng/checkrom
|
||||
install -c -m 644 dist/hplogo.png $(DESTDIR)$(PREFIX)/share/x48ng/hplogo.png
|
||||
cp -R dist/ROMs/ $(DESTDIR)$(PREFIX)/share/x48ng/
|
||||
sed "s|@PREFIX@|$(PREFIX)|g" dist/setup-x48ng-home.sh > $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
|
||||
install -c -m 755 dist/setup-x48ng-home.sh $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/share/x48ng/setup-x48ng-home.sh
|
||||
|
||||
install -m 755 -d -- $(DESTDIR)$(MANDIR)/man1
|
||||
|
|
19
dist/setup-x48ng-home.sh
vendored
19
dist/setup-x48ng-home.sh
vendored
|
@ -1,6 +1,9 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
DOTX48NG=${DOTX48NG:-~/.config/x48ng}
|
||||
cd "$(dirname "$0")" ; CWD=$(pwd)
|
||||
|
||||
CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
|
||||
DOTX48NG=${DOTX48NG:-$CONFIG_HOME/x48ng}
|
||||
CONFIG_FILE="${DOTX48NG}"/config.lua
|
||||
ROM=${ROM:-./ROMs/gxrom-r}
|
||||
|
||||
|
@ -9,7 +12,7 @@ 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 ./ROMs/ "${DOTX48NG}"/
|
||||
|
||||
cd "${DOTX48NG}"/ROMs/ || exit 1
|
||||
echo "The next step will download all available HP 48 ROMs from https://hpcalc.org where \"HP graciously began allowing this to be downloaded in mid-2000.\""
|
||||
|
@ -21,15 +24,15 @@ cd "${DOTX48NG}" || exit 1
|
|||
[ -e rom ] && mv rom rom.orig
|
||||
ln -s "$ROM" rom
|
||||
|
||||
PORT1_SIZE=128K
|
||||
PORT2_SIZE=4M
|
||||
PORT1_SIZE=128
|
||||
PORT2_SIZE=4096
|
||||
|
||||
if $(echo "$ROM" | grep -q "^sx"); then
|
||||
PORT2_SIZE=128K
|
||||
if echo "$ROM" | grep -q "^sx"; then
|
||||
PORT2_SIZE=128
|
||||
fi
|
||||
|
||||
[ -e port1 ] && mv port1 port1.orig
|
||||
@PREFIX@/share/x48ng/mkcard $PORT1_SIZE port1
|
||||
dd if=/dev/zero of="$DOTX48NG"/port1 bs=1k count=$PORT1_SIZE
|
||||
|
||||
[ -e port2 ] && mv port2 port2.orig
|
||||
@PREFIX@/share/x48ng/mkcard $PORT2_SIZE port2
|
||||
dd if=/dev/zero of="$DOTX48NG"/port2 bs=1k count=$PORT2_SIZE
|
||||
|
|
Loading…
Reference in a new issue