RcrdBrt

Untitled

Aug 23rd, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.02 KB | None | 0 0
  1. #!/bin/bash
  2. export TUNA="$HOME/Modelli"
  3. rm $TUNA/*
  4. export DAY=$(date +%d)
  5. export MONTH=$(date +%m)
  6. if [ -e arch/arm/boot/zImage ] ;
  7. then
  8.     echo "kernel compiled"
  9.     sleep 1
  10.     cp arch/arm/boot/zImage $TUNA/
  11.     cp crypto/ansi_cprng.ko $TUNA/
  12.     cp drivers/scsi/scsi_wait_scan.ko $TUNA/
  13.     cp drivers/rpmsg/rpmsg_*_sample.ko $TUNA/
  14.     #cp drivers/usb/musb/omap2430.ko $TUNA/
  15.     echo "stripping debug from modules"
  16.     $HOME/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-strip --strip-debug $TUNA/*.ko
  17.     cd $TUNA
  18.     echo "numer of compilation?"
  19.     read number
  20.     cd ramdisk/initramfs-4.1
  21.     find ramdisk/ | cpio -o -H newc | lzop -f > $TUNA/initramfs.cpio.lzo
  22.     cd $TUNA
  23.     abootimg --create boot.img -k zImage -r initramfs.cpio.lzo
  24.     mv boot.img cwm/
  25.         cd cwm
  26.     zip -r $TUNA/INK-$MONTH-$DAY+$number.zip META-INF/ boot.img
  27.     cd ..
  28.     rm initramfs.cpio.lzo cwm/boot.img
  29.     #mv ../INK-[0-12]*.zip ../INK-$MONTH-$DAY.zip
  30. fi
  31. if [ -e $TUNA/INK-*.zip ] ; then
  32.   echo "pushed kernel in Templates folder at $HOME"
  33.   echo "what do you want to do now?"
  34.   echo "1 = push the INK.zip in your home onto your attached device"
  35.   echo "2 = do nothing"
  36.   echo "3 = push kernel zip to goo.im"
  37. fi
  38. read choice
  39. if [ $choice = 1 ] ; then
  40.   echo "pushing your INK.zip in /sdcard/Download/ via adb"
  41.   echo "Is your device plugged via USB?"
  42.   echo "y or n?"
  43.   read opt1
  44.   if [ $opt1 = y ] ; then
  45.     adb push ../INK*.zip /sdcard/Download/
  46.     echo "pushed"
  47.   elif [ $opt1 = n ] ; then
  48.     echo "ok, I won't push, device not attached"
  49.     fi
  50. fi
  51. if [ $choice = 2 ] ; then
  52.   echo "finishing my task here..."
  53.   echo "see you during next compilation for a drink or so :D"
  54. fi
  55. if [ $choice = 3 ] ; then
  56.   echo "uploading to goo.im"
  57.   echo "do you want make it public?"
  58.   read public
  59.   if [ $public = y ] ; then
  60.     echo "uploading in public"
  61.     scp $TUNA/INK-*.zip goo.im:~/public_html/
  62.   elif [ $public = n ] ; then
  63.     echo "confidential mode = 1 B-)"
  64.     scp $TUNA/INK-*.zip goo.im:~/
  65.   fi
  66. fi
  67. cd $HOME/omap/
Advertisement
Add Comment
Please, Sign In to add comment