Created
December 5, 2020 12:59
-
-
Save ZoeS17/3e1f46006d990f990438decd00ff2a76 to your computer and use it in GitHub Desktop.
Update nodejs with apt workaround for failed package maintainer control. This explicitly replaces python-minimal with python3-minimal as a required dependency. Though it leaves the install up to the user.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /tmp | |
apt download nodejs 1>/dev/null 2>/dev/null | |
mkdir -p /tmp/oldnode | |
mkdir -p /tmp/newnode | |
rm oldnode/* 2>/dev/null | |
rm newnode/* 2>/dev/null | |
package=$(ls node*.deb) | |
ar x $package --output=oldnode/ | |
cd oldnode | |
tar xzf control.tar.gz | |
sed -i 's/python-/python3-/' control | |
tar --ignore-failed-read -czf control.tar.gz {post,pre}{inst,rm} md5sums control 2>/dev/null | |
ar rcs /tmp/newnode/$package debian-binary control.tar.gz data.tar.xz | |
rm /tmp/$package | |
echo "run \"sudo dpkg -i /tmp/newnode/$package\"" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment