I'm trying to write a script to automatically package my kernel just the way Slackware like it. It would be nice though if I could get the current working directory someone. Is there a way I can do this? The code explains it all
Code:
mkdir $dest/build
mkdir $dest/build/boot
make -C $dest/$source \
INSTALL_MOD_PATH=$dest/build \
INSTALL_PATH=$dest/build/boot \
install
cp $dest/$source/.config $dest/build/boot/config-$version
mv $dest/build/boot/vmlinuz $dest/build/boot/kernel-$version
cd $dest/build/boot
ln -s kernel-$version vmlinuz
ln -s config-$version config
cd -
cd $dest/build
makepkg -l y -c n kernel-$version-i686-1bob.tgz
mv kernel-$version-i686-1bob.tgz ..
cd -
rm -r $dest/build
Note how at on point I have cd - and then cd $dest/build just so I don't lose track of home base.