Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- echo "** Motorhead's Ramdisk Utility **"
- sleep 1
- echo ''
- echo 'Press 1 to disassemble'
- echo ''
- echo 'Press 2 to rebuild'
- read utility
- if [ $utility = "1" ]; then
- echo 'Going to disassembly'
- mkdir ramdisk
- cd ramdisk
- echo 'which ramdisk do you want disassembled?'
- read input
- gunzip -c ../$input.cpio.gz | cpio -i
- cd ../
- echo 'Continue to renaming?'
- read answer
- if [ "$answer" = "y" ] || [ "$answer" = "yes" ] || [ "$answer" = "Y" ] || [ "$answer" = "Yes" ]; then
- echo 'Name your new ramdisk directory';
- read name
- mv ./ramdisk ./$name
- else echo 'Ok, no renaming then. Make your changes before rebuilding';
- fi
- fi
- if [ $utility = "2" ]; then
- echo 'Going to rebuild'
- sleep 1
- echo 'what ramdisk do you want rebuilt?'
- read dir
- cd $dir
- find . | cpio -o -H newc | gzip > ../new-ramdisk.cpio.gz
- cd ../
- echo ''
- echo 'Done! Continue on with your image building';
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement