Oh noes! It R gone!

Ok. I do geeky stuff for my job. Some of the tasks can get esoteric and repetitive.

Shell scripts to the rescue!

While it’s great to automate tasks, sometimes in the shuffle of work you forget to archive a good script. After several months of not needing this thing, I realized I may have lost said script while tightening up the HD for space.

Headache time. I start digging through websites reassembling this thing. But, much to my luck, I find I have outsmarted myself. Buried in a backup I find the little nugget of happy.

Yay! It’s safely in CVS now:


. /etc/dvi.conf

cd /usr/src/linux \
&& make menuconfig \
&& make \
&& make modules_install \
&& splash_geninitramfs -v -g $SPLASH_INITRAMFS -r $SPLASH_RES $SPLASH_THEME \
&& make bzImage \
&& cp -v arch/i386/boot/bzImage $PROD_KERNEL \
&& cp -v System.map $PROD_MAP \
&& cp -v .config $PROD_CONFIG \
&& echo \
&& echo “You have 10 seconds to hit CTRL-C before I reboot into the new Kernel” \
&& sleep 10 \
&& reboot

One Response to “Oh noes! It R gone!”

  1. giza says:

    You know… a “set -e” at the beginning of the script will make all of those “&&”s unnecessary. 🙂

Leave a Response