Difference between revisions of "C linux development"
From Teknologisk videncenter
m (→Debian based distro) |
m |
||
| Line 4: | Line 4: | ||
Copy and paste the text below into your privileged shell session. ('''sudu bash''' first) | Copy and paste the text below into your privileged shell session. ('''sudu bash''' first) | ||
*'''(Read first and check security riscs)''' | *'''(Read first and check security riscs)''' | ||
| + | <source lang=bash> | ||
| + | cd ~; cat << EOF > updatescript | ||
| + | #!/usr/bin/env bash | ||
| + | LIST="build-essential manpages-dev glibc-doc dpkg-dev linux-doc | ||
| + | user-mode-linux-doc libssl-dev docbook docbook-xml | ||
| + | docbook-xsl xsltproc libsystemd-dev libcjson1 | ||
| + | libcjson-dev" | ||
| + | LOGFILE="./apt-install.log" | ||
| + | >$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 | ||
| + | rm updatescript | ||
| + | cat ./apt-install.log | ||
| + | </source> | ||
| + | <!-------- FIRST SCRIPT | ||
<source lang=bash> | <source lang=bash> | ||
cd ~; cat << EOF > updatescript | cd ~; cat << EOF > updatescript | ||
| Line 27: | Line 64: | ||
</source> | </source> | ||
| − | + | -----> | |
[[Category:Linux]][[Category:C]][[Category:GNU]] | [[Category:Linux]][[Category:C]][[Category:GNU]] | ||
Revision as of 17:49, 20 December 2022
Debian based distro
Probably more packages than you need... Copy and paste the text below into your privileged shell session. (sudu bash first)
- (Read first and check security riscs)
cd ~; cat << EOF > updatescript
#!/usr/bin/env bash
LIST="build-essential manpages-dev glibc-doc dpkg-dev linux-doc
user-mode-linux-doc libssl-dev docbook docbook-xml
docbook-xsl xsltproc libsystemd-dev libcjson1
libcjson-dev"
LOGFILE="./apt-install.log"
>$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
rm updatescript
cat ./apt-install.log