Author Topic: First Shell Script!!  (Read 17648 times)

Offline RagingNinja

  • SuperHero Member
  • *****
  • Posts: 1863
  • Country: us
  • Ninja
    • View Profile
    • Whited00r
  • Device: iPhone 2G
  • My Computer: Windows
Re: First Shell Script!!
« Reply #45 on: May 27, 2011, 03:27:25 AM »
bit then I'd be tempted to copy ninja script...

I can tell if you do.   

There are different ways of doing it :)

How about a daemon remover?
Or an appswither/folder themer?
Or a layout backup-er  (already made one, the layout is stored in /User/Library/Preferences/com.apple.springboard.plist)


Hehe, goes to show you someone as "experienced" as Brian can make a simple mistake! Lol for some reason that makes me happy.

Brian I need to chat with you about some stuff.

You know how I tried to use the variable "$names" but it was empty?

I need to learn (I'm can't seem to get the concept of) doing something like this.

Pretty much I want to move folders too (like your QuickGame that you recommend me do before you made quickgame).

How do I do something like this mv "/Applications/com.springboard.folder$numbers.app"

I totally forgot. What kind of function/loop/read do I need to do in order to move ALL the folders to my SubstrateKILL folder while in "gaming mode".

(I also NEED to learn how to ONLY move the dylib and plist files). Because if you turn off or reboot your device while SubstrateKILL has disabled everything I think it will force you to restore since I moved the ENTIRE DynamicLibraries directory out of "Mobile Substrate".......

Didn't you do something like...

for i in {0..50}   ???
iPhone 2G, 8GB - iPhone 4S, 16GB, iOS v6.1
Multi-Tasking v1.0.3 - Folders v1.2.1 - iOS 3 Wallpaper 1.0.2(1)
WD Recommended/Compatible Tweaks, Themes, etc. | My Repo: cydia.ragingninja.bplaced.net

Offline Bruan

  • Feature Developer
  • Administrator
  • SuperHero Member
  • *****
  • Posts: 13082
  • Country: 00
  • Methuselah
    • View Profile
    • Bruan_WD Twitter
  • Device: iPhone 3G
  • My Computer: Linux
Re: First Shell Script!!
« Reply #46 on: May 27, 2011, 03:58:51 AM »
What did I mess up on?  I know my thing I'm working on for having multiple users caused me to need o restore cuz I scripted a function on my device that I misplaced a "." :P. It kept on respringkng everytime I tried to lock it.   But yes, I make a lot of mistakes ;) that is how you learn :P.  I never had anyone teach me, so I made a whole lot on wintersled, and had to restore around 140 times for that :/

I can't help you today, as I'm needing sleep now :P
but I will be quite happy to try and see if I can get on irc tomorrow.

Look at my Quickgame app code, in /Applications/QuickGame/main
it is a good example I'm thinking.


But yes,
for I in {0..50};
do
echo "this is variable $I"
done

for loops are usefull too!  I only recently learnt how to use them in a good way :P

and I wouldn't say I'm "experienced".  I just know more than you, but there are tons of people who know more than me, and we both have a lot to learn ;)

Offline RagingNinja

  • SuperHero Member
  • *****
  • Posts: 1863
  • Country: us
  • Ninja
    • View Profile
    • Whited00r
  • Device: iPhone 2G
  • My Computer: Windows
Re: First Shell Script!!
« Reply #47 on: May 27, 2011, 04:52:57 AM »
Hehe... I'm just having fun. ;)

Hmm... so if I wanted to take ALL the folders from /Applications/com.springboard.folder$i.app

I would write something like...

for i in {1..50};
do
mv "/Applications/com.springboard.folder$i.app" "$variable/FOLDERNAME"
echo "Moving Folder com.springboard.folder$.app"
done


? Or am I completely misunderstanding the concept of it...

P.S I can't really get on IRC tomorrow. I gotta go to the school tomorrow for like... 3-4 hours to do some stuff.
iPhone 2G, 8GB - iPhone 4S, 16GB, iOS v6.1
Multi-Tasking v1.0.3 - Folders v1.2.1 - iOS 3 Wallpaper 1.0.2(1)
WD Recommended/Compatible Tweaks, Themes, etc. | My Repo: cydia.ragingninja.bplaced.net

Offline Sniper&Assaulter

  • Hero Member
  • ****
  • Posts: 340
  • Country: 00
    • View Profile
  • Device: iPhone 3G
  • My Computer: Windows
Re: First Shell Script!!
« Reply #48 on: May 27, 2011, 05:25:48 AM »
that bad to you thought

Offline Bruan

  • Feature Developer
  • Administrator
  • SuperHero Member
  • *****
  • Posts: 13082
  • Country: 00
  • Methuselah
    • View Profile
    • Bruan_WD Twitter
  • Device: iPhone 3G
  • My Computer: Linux
Re: First Shell Script!!
« Reply #49 on: May 27, 2011, 02:36:45 PM »
@ninja it depends what you set "$variable" to.  Aside from that, yes.   If variable is something like
"variable=/Library/Foldersdisabled/". Then yes, that would work ;)