-
-
Save zekefeu/afb29296db34d2451cdddcc14dbeef3c to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# Solution provided by https://github.com/renhiyama | |
# (https://github.com/Jarred-Sumner/bun/issues/282#issuecomment-1177154684) | |
# License agreement | |
echo "The Intel Software Development Emulator is distributed under the Intel Software License Agreement, available at https://www.intel.com/content/dam/develop/external/us/en/documents/pdf/intel-simplified-software-license-version-august-2021.pdf" | |
echo "" | |
echo "If you do not accept the terms of the license agreement, you have 10 seconds to stop this script (Ctrl+C)" | |
sleep 10 | |
# Create directories | |
[ ! -d /tmp/bun-sde-fix ] && mkdir /tmp/bun-sde-fix | |
[ ! -d ~/.sde ] && mkdir ~/.sde | |
echo "Downloading SDE package" && \ | |
curl -sS https://downloadmirror.intel.com/732268/sde-external-9.7.0-2022-05-09-lin.tar.xz -o /tmp/bun-sde-fix/sde-package.tar.xz && \ | |
echo "Extracting into ~/.sde" && \ | |
tar -xf /tmp/bun-sde-fix/sde-package.tar.xz --strip-components=1 -C ~/.sde | |
# Create aliases | |
[ -f ~/.bashrc ] && echo '[ -d ~/.sde ] && alias bun="~/.sde/sde -chip-check-disable -- bun"' >> ~/.bashrc | |
[ -f ~/.zshrc ] && echo '[ -d ~/.sde ] && alias bun="~/.sde/sde -chip-check-disable -- bun"' >> ~/.zshrc | |
alias bun="~/.sde/sde -chip-check-disable -- bun" | |
echo "The default supported shells are bash and zsh." | |
echo 'For other shells, add [ -d ~/.sde ] && alias bun="~/.sde/sde -chip-check-disable -- bun" to the config file.' | |
echo "When the issue will be fixed, remove ~/.sde." | |
rm -rf /tmp/bun-sde-fix | |
echo "Done, thank you." | |
I did credit you in the messages I sent, but not here. I'll do that in a sec.
๐
Please run the alias command along with writing that in zshrc/bashrc , so theres no need to restart the shell...
Please run the alias command along with writing that in zshrc/bashrc , so theres no need to restart the shell...
done
Had to switch from ~/.sde/sde
to ~/.sde/sde64
in the alias when installing under WSL2 for some reason, without it I would get the error zsh: no such file or directory: /home/k/.sde/sde
Had to switch from
~/.sde/sde
to~/.sde/sde64
in the alias when installing under WSL2 for some reason, without it I would get the errorzsh: no such file or directory: /home/k/.sde/sde
That happens because "no such file" error even includes if the binary is for 32 bit instead of 64 bit...
@fuka-g replace sde with sde64 if the CPU is 64 bit (I'm sure there's some cheap command to do that ๐ )
I'm going on break for a week or two, can you work on a fix ? If not, I'll do it when I get back.
Had to switch from
~/.sde/sde
to~/.sde/sde64
in the alias when installing under WSL2 for some reason, without it I would get the errorzsh: no such file or directory: /home/k/.sde/sde
That happens because "no such file" error even includes if the binary is for 32 bit instead of 64 bit... @fuka-g replace sde with sde64 if the CPU is 64 bit (I'm sure there's some cheap command to do that smile )
Fixed here https://gist.github.com/spidyhackx/194108a0df2b4fc8df642f126edcc0e5
Imagine no credits xD
(no problem btw)