Modules directory from default clone directory
Closed this issue · 4 comments
Modules is created in $HOME due to use of cd, netup directory does not exist in original clone directory, and the usage of cd causes modules to be cloned in home directory.
Cloning default clone via git clone https://github.com/private-locker/NET-UP.git
will result in the directory created containing the net-up source to be named NET-UP.
Modules are set up to look in the netup directory via updatemods() in the updatemodules file.
Netup Console> list
[!] Listing ALL Modules:
[!] ----------------------
ls: cannot access '/home/joseph/NET-UP/modules': No such file or directory
Netup Console> updatemods
[-] Update your Modules Directory and sync with Private-Locker's GitHub?
[!] THIS WILL REMOVE YOUR MODULES DIRECTORY!
Are you sure? [Y/n]y
[-] Removing Old Modules Directory..
/home/joseph/NET-UP/src/updatemodules: line 15: cd: netup: No such file or directory
Cloning into 'modules'...
remote: Enumerating objects: 117, done.
remote: Counting objects: 100% (117/117), done.
remote: Compressing objects: 100% (112/112), done.
remote: Total 117 (delta 64), reused 16 (delta 3), pack-reused 0
Receiving objects: 100% (117/117), 35.17 KiB | 1.21 MiB/s, done.
Resolving deltas: 100% (64/64), done.
`
This is why we recommend using the Installer Script.. We might want to create a "check folder" function.
Added this to the README.md until we get something figured out.
...
Install NET-UP:
$ su
# cd
# git clone https://github.com/private-locker/NET-UP.git netup
# cd netup
# ./netup
...
I will put in something to check for working/modules directory. Some users would prefer to run stand-alone, I would think, and it makes development quicker for me as well.
Installing this into the root user directory something I'm not huge on, and some root user accounts may not even have a home directory, so this would lead to the installation being in your root directory /
This could search for typical places that it would be located, similar to how vim or bash searches for their configurations, and if needed allow a user to set a custom location.
If you like the console, I can implement additional features to make it easier to customize configuration.
I have fixed this issue with the last commits made.
Now netup will check if its in the correct directory before allowing it to proceed.. If person runs netup straight from github source. It will automatically initialize the install script. - But does throw some errors due to person not using the Easy Install script.