Author Topic: Bash Script to clone SOBI2 and Plugins (Cloning Tool)  (Read 100905 times)

0 Members and 1 Guest are viewing this topic.

Offline neo

  • Sobi Team
  • Development
  • Sobi Hero
  • *
  • Posts: 8088
  • Reviews:

    What is it?

    • Sobi Team Member
Bash Script to clone SOBI2 and Plugins (Cloning Tool)
« on: 14. June 2008, 20:26:32 »
Hi All,

I wrote small bash script to clone SOBI2 and all possible add-ons.
It works of course only under Linux and Mac OS.

Edit: this script has been added to our download directory: http://www.sigsiu.net/download/tools/cloning_tool.html

I have created two ( for Joomla! 1.5 and Joomla! 1.0 ) clones called com_sobidir. Additionally I have also clone for Joomla! 1.5 called  com_extensions (as on the demo site) with menu module, Report Listing plugin, Review & Rating plugin and SobiSef. These are clones of the latest SOBI2 RC2.9.1.0 version. If you want to have it, just let me know.
Condition to get this clone; at least one review star   ;)

  • Extract SOBI2 (or plugin or module etc)
  • Copy the attached script (and unpack of course) into the directory where You've unpacked SOBI2 (or plugin or module etc)
  • From the console execute sh clone_sobi.sh

You should see something like this:
Quote
radek@radek-laptop:~/Desktop/com_sobi2-RC2.8.svn-4100$ sh clone_sobi.sh
Enter clon name:
newsobiclone
Parsing ./toolbar.sobi2.php
............
Parsing ./admin.sobi2.cats.php
Parsing ./sobi2.xml

Enter menu description
My new SOBI2 clone

Renaming ./toolbar.sobi2.php to ./toolbar.newsobiclone.php
Renaming ./templates/default/sobi2.form.tmpl.php to ./templates/default/newsobiclone.form.tmpl.php
............
Renaming ./admin.sobi2.class.html.php to ./admin.newsobiclone.class.html.php
Renaming ./admin.sobi2.html.php to ./admin.newsobiclone.html.php

done: created new clone for SOBI2 called newsobiclone. You can pack it as ZIP file and install in Mambo/Joomla

<a href="https://www.sigsiu.net/video/mediaplayer.swf?file=files/clone_sobi2.flv" target="_blank" class="new_win">https://www.sigsiu.net/video/mediaplayer.swf?file=files/clone_sobi2.flv</a>

Regards,
Neo
« Last Edit: 09. January 2009, 07:27:14 by neo »
Support SobiPro - Submit a review on JED
If you want ongoing development for SobiPro and new applications being developed we need your review for SobiPro in the Joomla Extensions Directory.
Thank you very much :w00t:
Country: Germany Germany |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile 


Offline BigBoss

Re: Bash Script to clone SOBI2 and Plugins (Cloning Tool)
« Reply #1 on: 15. June 2008, 08:24:34 »
WOW....! Great Work Neo!

I will try it as soon as I get a chance.
Country: Canada Canada |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile

Do you want continued ongoing development, new features and active support?
Please write a review or just vote for SOBI on JED.

Offline neo

  • Sobi Team
  • Development
  • Sobi Hero
  • *
  • Posts: 8088
  • Reviews:

    What is it?

    • Sobi Team Member
Re: Bash Script to clone SOBI2 and Plugins (Cloning Tool)
« Reply #2 on: 15. June 2008, 10:15:29 »
BTW I think it should also work on Mac. Am I right ?
Support SobiPro - Submit a review on JED
If you want ongoing development for SobiPro and new applications being developed we need your review for SobiPro in the Joomla Extensions Directory.
Thank you very much :w00t:
Country: Germany Germany |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile 

Offline Snake Blisken

Re: Bash Script to clone SOBI2 and Plugins (Cloning Tool)
« Reply #3 on: 15. June 2008, 10:37:49 »
Great Work, Once again Neo!!

Very useful tool ;)

Snake Blisken
Walk Slowly And Carry A Big Gun
http://www.sastay.co.za
Country: South Africa South Africa |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile Sa Stay

Offline bwilhelm

Re: Bash Script to clone SOBI2 and Plugins (Cloning Tool)
« Reply #4 on: 15. June 2008, 20:45:59 »
NEO, this is excellent.

I work on a Mac to administer a linux server on the web. I was having problems using the find-replace technique to create a clone of 2.8.6. It worked one time, and was able to get one clone made that way, but subsequent attemtps to create additional clones kept failing.

I decided to try your bash script. Here were the steps I took:

1) Using webmin, uploaded the latest SOBI2 component zip file and extracted it on the server.
2) Uploaded your bash script to the same directory as the extracted SOBI2 Component.
3) Opened up my SSH client on my mac, and connected to the server.
4) Changed directories to my directory where the bash script and extracted SOBI2 files were.
5) Executed the bash script with the 'sh clone_sobi.sh' command.
6) Followed the prompts in the script to name my new clone.
7) The script completed successfully, verified by observing the renamed files in the directory.
8 ) In Joomla 1.5, went to the component install screen and used the INSTALL DIRECTORY option (the directory where the extracted and now modified SOBI2 files were).
9) Clicked the install button and SUCCESS! Component installed successfully.

Upon looking at the component menu, my new clone appears in the list, and everything in the clone appears to be working properly thus far. I'll let you know if I run in to any bugs.

Thanks again for your script!
« Last Edit: 15. June 2008, 20:47:59 by bwilhelm »
Country: United States United States |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile

Offline neo

  • Sobi Team
  • Development
  • Sobi Hero
  • *
  • Posts: 8088
  • Reviews:

    What is it?

    • Sobi Team Member
Re: Bash Script to clone SOBI2 and Plugins (Cloning Tool)
« Reply #5 on: 15. June 2008, 21:05:39 »
Thanks for the feedback. I'm happy that it works for You  :)

BTW: Did You tried to use it also local? I think is should also works on MacOS.

Regards,
Neo
Support SobiPro - Submit a review on JED
If you want ongoing development for SobiPro and new applications being developed we need your review for SobiPro in the Joomla Extensions Directory.
Thank you very much :w00t:
Country: Germany Germany |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile 

Offline bwilhelm

Re: Bash Script to clone SOBI2 and Plugins (Cloning Tool)
« Reply #6 on: 16. June 2008, 04:52:38 »
I have not tried it locally on my mac yet, but for the next clone, i will try that.
Country: United States United States |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile

Offline neo

  • Sobi Team
  • Development
  • Sobi Hero
  • *
  • Posts: 8088
  • Reviews:

    What is it?

    • Sobi Team Member
Re: Bash Script to clone SOBI2 and Plugins (Cloning Tool)
« Reply #7 on: 16. June 2008, 08:24:12 »
new version attached.
Fixed problem with the redeclaring search function.

Regards,
Neo
Support SobiPro - Submit a review on JED
If you want ongoing development for SobiPro and new applications being developed we need your review for SobiPro in the Joomla Extensions Directory.
Thank you very much :w00t:
Country: Germany Germany |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile 

Offline pala

Re: Bash Script to clone SOBI2 and Plugins (Cloning Tool)
« Reply #8 on: 22. June 2008, 19:12:15 »
Hi Neo

Installed your testing clone.. when I try add a entry I get the following error:

Code: [Select]
Fatal error: Cannot redeclare class directory in W:\www\***\components\com_directory\directory.class.php on line 22
Country: South Africa South Africa |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile

Offline neo

  • Sobi Team
  • Development
  • Sobi Hero
  • *
  • Posts: 8088
  • Reviews:

    What is it?

    • Sobi Team Member
Re: Bash Script to clone SOBI2 and Plugins (Cloning Tool)
« Reply #9 on: 25. June 2008, 06:51:04 »
Installed your testing clone.. when I try add a entry I get the following error:

In frontend or backend?

Code: [Select]
Fatal error: Cannot redeclare class directory in W:\www\***\components\com_directory\directory.class.php on line 22

Could You post the whole message. There should be also something like "previously declared in ....."

Regards,
Neo
Support SobiPro - Submit a review on JED
If you want ongoing development for SobiPro and new applications being developed we need your review for SobiPro in the Joomla Extensions Directory.
Thank you very much :w00t:
Country: Germany Germany |  OS: Unknown Unknown Browser: Unknown Unknown | View Profile 

Tags: