Difference between revisions of "C linux development"
From Teknologisk videncenter
m |
m (→Debian based distro) |
||
(15 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
=Debian based distro= | =Debian based distro= | ||
Probably more packages than you need... | Probably more packages than you need... | ||
− | Copy and paste the text below into your privileged shell session. | + | Copy and paste the text below into your privileged shell session. |
+ | |||
+ | '''IMPORTANT''': Run '''apt update''' and '''apt upgrade''' first! | ||
*'''(Read first and check security riscs)''' | *'''(Read first and check security riscs)''' | ||
<source lang=bash> | <source lang=bash> | ||
− | cd ~; cat << EOF > updatescript | + | cd ~; cat << 'EOF' > updatescript |
#!/usr/bin/env bash | #!/usr/bin/env bash | ||
− | LIST="build-essential manpages-dev glibc-doc dpkg-dev linux-doc | + | sudo apt -y update |
− | user-mode-linux-doc libssl-dev docbook docbook-xml | + | sudo apt -y upgrade |
− | docbook-xsl xsltproc libsystemd-dev libcjson1 | + | |
− | libcjson-dev" | + | LIST="man-db build-essential manpages-dev glibc-doc dpkg-dev linux-doc |
+ | user-mode-linux-doc libssl-dev docbook docbook-xml devscripts | ||
+ | docbook-xsl xsltproc libsystemd-dev libltdl-dev libcjson1 | ||
+ | libcjson-dev libltdl-dev gdb tmux" | ||
LOGFILE="./apt-install.log" | LOGFILE="./apt-install.log" | ||
− | echo "" >$LOGFILE | + | echo "" > $LOGFILE |
DIRTY=0 | DIRTY=0 | ||
Line 36: | Line 41: | ||
EOF | EOF | ||
chmod +x updatescript | chmod +x updatescript | ||
− | sudo ./updatescript | + | sudo ./updatescript |
− | |||
− | |||
</source> | </source> | ||
<!-------- FIRST SCRIPT | <!-------- FIRST SCRIPT |
Latest revision as of 06:51, 8 August 2024
Debian based distro
Probably more packages than you need... Copy and paste the text below into your privileged shell session.
IMPORTANT: Run apt update and apt upgrade first!
- (Read first and check security riscs)
cd ~; cat << 'EOF' > updatescript
#!/usr/bin/env bash
sudo apt -y update
sudo apt -y upgrade
LIST="man-db build-essential manpages-dev glibc-doc dpkg-dev linux-doc
user-mode-linux-doc libssl-dev docbook docbook-xml devscripts
docbook-xsl xsltproc libsystemd-dev libltdl-dev libcjson1
libcjson-dev libltdl-dev gdb tmux"
LOGFILE="./apt-install.log"
echo "" > $LOGFILE
DIRTY=0
for PACK in $LIST
do
printf "Installerer %s\n" $PACK
if apt -y install $PACK
then
printf "Package %s OK\n" $PACK >> $LOGFILE
else
printf "Package %s FAILED......................\n" $PACK >> $LOGFILE
let DIRTY=DIRTY+1
fi
done
printf "\n\n**************************************************\n"
if test $DIRTY -eq 0
then
printf "Seems all look good - all packages OK\n"
else
printf "ERROR: %d packages failed - see logfile: %s\n" $DIRTY $LOGFILE
fi
printf "**************************************************\n"
EOF
chmod +x updatescript
sudo ./updatescript