New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tests for install & uninstall #115

Merged
merged 28 commits into from May 25, 2017

Conversation

Projects
None yet
2 participants
@TitanSnow
Contributor

TitanSnow commented May 23, 2017

add tests for install & uninstall, with/without sudo

I also fix the $(xmake) so that it will be always correct. See details at commit message

Have some problem on mac os on travis-ci

TitanSnow added some commits May 23, 2017

add xmake._EXECUTABLE_PATH to fix $(xmake)
$(xmake) is set to join(_PROGRAM_DIR, 'xmake')
that is wrong when XMAKE_PROGRAM_DIR is set to
another program dir (like developing dir) with no executable

so use system-special ways to get absolution path
of executable file always
@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 23, 2017

Member

@TitanSnow Using $(xmake) has some of the following issues:

  • If the path has spaces (on windows. .e.g "C:\Program Files\xmake\xmake.exe"), double quotes are required, for example:
os.run("\"$(xmake)\" f -c")
  • If users don't see the document, they don't know if they have this variable: $(xmake), then they will still run it directly. os.run("xmake")

So, I'm going to remove $(xmake) and use os.run("xmake") directly and add the executable path of xmake to PATH env. for example:

function main()
        ..
        os.addenv("PATH", xmake._EXECUTABLE_DIR)

I think it's easier to use, and users don't have to care about the path of xmake.

Member

waruqi commented May 23, 2017

@TitanSnow Using $(xmake) has some of the following issues:

  • If the path has spaces (on windows. .e.g "C:\Program Files\xmake\xmake.exe"), double quotes are required, for example:
os.run("\"$(xmake)\" f -c")
  • If users don't see the document, they don't know if they have this variable: $(xmake), then they will still run it directly. os.run("xmake")

So, I'm going to remove $(xmake) and use os.run("xmake") directly and add the executable path of xmake to PATH env. for example:

function main()
        ..
        os.addenv("PATH", xmake._EXECUTABLE_DIR)

I think it's easier to use, and users don't have to care about the path of xmake.

TitanSnow added some commits May 23, 2017

sudo luarocks install
to fix build on macos

`sudo luarocks install` will install to global package tree
that running as all users could find
@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot May 23, 2017

Codecov Report

Merging #115 into dev will increase coverage by 1.65%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #115      +/-   ##
==========================================
+ Coverage   68.13%   69.79%   +1.65%     
==========================================
  Files         246      250       +4     
  Lines       10032    10424     +392     
==========================================
+ Hits         6835     7275     +440     
+ Misses       3197     3149      -48
Impacted Files Coverage Δ
core/src/xmake/readline/readline.c 0% <0%> (ø) ⬆️
core/src/xmake/machine.c 93.75% <100%> (+7.81%) ⬆️
xmake/core/sandbox/modules/os.lua 77.58% <100%> (+1.58%) ⬆️
xmake/modules/privilege/sudo.lua 53.06% <50%> (+14.28%) ⬆️
xmake/platforms/windows/check.lua 78.85% <0%> (ø)
xmake/tools/lib.lua 96.42% <0%> (ø)
xmake/tools/link.lua 78.57% <0%> (ø)
xmake/tools/cl.lua 51.12% <0%> (ø)
xmake/core/main.lua 75.3% <0%> (+1.23%) ⬆️
xmake/actions/package/main.lua 83.82% <0%> (+1.47%) ⬆️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3768a82...67a5ad7. Read the comment docs.

codecov bot commented May 23, 2017

Codecov Report

Merging #115 into dev will increase coverage by 1.65%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #115      +/-   ##
==========================================
+ Coverage   68.13%   69.79%   +1.65%     
==========================================
  Files         246      250       +4     
  Lines       10032    10424     +392     
==========================================
+ Hits         6835     7275     +440     
+ Misses       3197     3149      -48
Impacted Files Coverage Δ
core/src/xmake/readline/readline.c 0% <0%> (ø) ⬆️
core/src/xmake/machine.c 93.75% <100%> (+7.81%) ⬆️
xmake/core/sandbox/modules/os.lua 77.58% <100%> (+1.58%) ⬆️
xmake/modules/privilege/sudo.lua 53.06% <50%> (+14.28%) ⬆️
xmake/platforms/windows/check.lua 78.85% <0%> (ø)
xmake/tools/lib.lua 96.42% <0%> (ø)
xmake/tools/link.lua 78.57% <0%> (ø)
xmake/tools/cl.lua 51.12% <0%> (ø)
xmake/core/main.lua 75.3% <0%> (+1.23%) ⬆️
xmake/actions/package/main.lua 83.82% <0%> (+1.47%) ⬆️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3768a82...67a5ad7. Read the comment docs.

@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 23, 2017

Contributor

Great! 👍

Contributor

TitanSnow commented May 23, 2017

Great! 👍

@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 23, 2017

Contributor

There is a situation that needs $(xmake). That is, sudo $(xmake). sudo will delete environment var so that the path of xmake must be known

Contributor

TitanSnow commented May 23, 2017

There is a situation that needs $(xmake). That is, sudo $(xmake). sudo will delete environment var so that the path of xmake must be known

@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 24, 2017

Contributor

luacov.runner not found on macos. Wired

Contributor

TitanSnow commented May 24, 2017

luacov.runner not found on macos. Wired

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 24, 2017

Member

@TitanSnow

There is a situation that needs $(xmake). That is, sudo $(xmake). sudo will delete environment var so that the path of xmake must be known.

You can use sudo -E xmake or os.sudo(os.run, "xmake f -c")(in os.lua).

Pass -E argument will preserve user environment when running sudo command. So I think $(xmake) is not necessary.

Member

waruqi commented May 24, 2017

@TitanSnow

There is a situation that needs $(xmake). That is, sudo $(xmake). sudo will delete environment var so that the path of xmake must be known.

You can use sudo -E xmake or os.sudo(os.run, "xmake f -c")(in os.lua).

Pass -E argument will preserve user environment when running sudo command. So I think $(xmake) is not necessary.

@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 24, 2017

Contributor

no use @waruqi

$ xmake l
> os.getenv("PATH")
/home/ts/.local/share/xmake:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ts/.local/bin
> os.sudo(os.exec,"sh -c 'echo $PATH'")
[sudo] password for ts: 
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
> os.exec("sudo -E sh -c 'echo $PATH'")
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
Contributor

TitanSnow commented May 24, 2017

no use @waruqi

$ xmake l
> os.getenv("PATH")
/home/ts/.local/share/xmake:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ts/.local/bin
> os.sudo(os.exec,"sh -c 'echo $PATH'")
[sudo] password for ts: 
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
> os.exec("sudo -E sh -c 'echo $PATH'")
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 24, 2017

Member

@TitanSnow

It works on my machine(macOS and archlinux).

xmake l
> os.addenv("PATH", "/tmp/test")
> os.getenv("PATH")
/tmp/test:/Users/ruki/.cargo/bin:/Users/ruki/.rvm/gems/ruby-2.2.2/bin:/Users/ruki/.rvm/gems/ruby-2.2.2@global/bin:/Users/ruki/.rvm/rubies/ruby-2.2.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ruki/.rvm/bin
> os.exec("sudo -E xmake l --root -c 'print(os.getenv(\"PATH\"))'")
/tmp/test:/Users/ruki/.cargo/bin:/Users/ruki/.rvm/gems/ruby-2.2.2/bin:/Users/ruki/.rvm/gems/ruby-2.2.2@global/bin:/Users/ruki/.rvm/rubies/ruby-2.2.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ruki/.rvm/bin
> os.sudo(os.exec, "xmake l --root -c 'print(os.getenv(\"PATH\"))'")
/tmp/test:/Users/ruki/.cargo/bin:/Users/ruki/.rvm/gems/ruby-2.2.2/bin:/Users/ruki/.rvm/gems/ruby-2.2.2@global/bin:/Users/ruki/.rvm/rubies/ruby-2.2.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ruki/.rvm/bin
> os.exec("sudo -E sh -c 'echo $PATH'")
/tmp/test:/Users/ruki/.cargo/bin:/Users/ruki/.rvm/gems/ruby-2.2.2/bin:/Users/ruki/.rvm/gems/ruby-2.2.2@global/bin:/Users/ruki/.rvm/rubies/ruby-2.2.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ruki/.rvm/bin
> os.sudo(os.exec,"sh -c 'echo $PATH'")
/tmp/test:/Users/ruki/.cargo/bin:/Users/ruki/.rvm/gems/ruby-2.2.2/bin:/Users/ruki/.rvm/gems/ruby-2.2.2@global/bin:/Users/ruki/.rvm/rubies/ruby-2.2.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ruki/.rvm/bin
Member

waruqi commented May 24, 2017

@TitanSnow

It works on my machine(macOS and archlinux).

xmake l
> os.addenv("PATH", "/tmp/test")
> os.getenv("PATH")
/tmp/test:/Users/ruki/.cargo/bin:/Users/ruki/.rvm/gems/ruby-2.2.2/bin:/Users/ruki/.rvm/gems/ruby-2.2.2@global/bin:/Users/ruki/.rvm/rubies/ruby-2.2.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ruki/.rvm/bin
> os.exec("sudo -E xmake l --root -c 'print(os.getenv(\"PATH\"))'")
/tmp/test:/Users/ruki/.cargo/bin:/Users/ruki/.rvm/gems/ruby-2.2.2/bin:/Users/ruki/.rvm/gems/ruby-2.2.2@global/bin:/Users/ruki/.rvm/rubies/ruby-2.2.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ruki/.rvm/bin
> os.sudo(os.exec, "xmake l --root -c 'print(os.getenv(\"PATH\"))'")
/tmp/test:/Users/ruki/.cargo/bin:/Users/ruki/.rvm/gems/ruby-2.2.2/bin:/Users/ruki/.rvm/gems/ruby-2.2.2@global/bin:/Users/ruki/.rvm/rubies/ruby-2.2.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ruki/.rvm/bin
> os.exec("sudo -E sh -c 'echo $PATH'")
/tmp/test:/Users/ruki/.cargo/bin:/Users/ruki/.rvm/gems/ruby-2.2.2/bin:/Users/ruki/.rvm/gems/ruby-2.2.2@global/bin:/Users/ruki/.rvm/rubies/ruby-2.2.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ruki/.rvm/bin
> os.sudo(os.exec,"sh -c 'echo $PATH'")
/tmp/test:/Users/ruki/.cargo/bin:/Users/ruki/.rvm/gems/ruby-2.2.2/bin:/Users/ruki/.rvm/gems/ruby-2.2.2@global/bin:/Users/ruki/.rvm/rubies/ruby-2.2.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ruki/.rvm/bin
@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 24, 2017

Contributor

I found some info on stackoverflow. Seems ubuntu's behavior on sudo is different from others 😓

As travis-ci uses ubuntu, we have no way to drop $(xmake)

Contributor

TitanSnow commented May 24, 2017

I found some info on stackoverflow. Seems ubuntu's behavior on sudo is different from others 😓

As travis-ci uses ubuntu, we have no way to drop $(xmake)

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 24, 2017

Member

@TitanSnow I am going to try adding detect.tool.find_sudo and privilege.sudo extension modules in xmake/modules dir to handle these differences

Member

waruqi commented May 24, 2017

@TitanSnow I am going to try adding detect.tool.find_sudo and privilege.sudo extension modules in xmake/modules dir to handle these differences

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 24, 2017

Member

@TitanSnow I have removed the $(xmake) variable and and even if sudo cannot inherit the parent environment, the path of xmake is always in the $PATH because I'll add it's directory to $PATH in the main entry function.

function main.init()

    -- add the directory of the program file (xmake) to $PATH environment
    local programfile = os.programfile()
    if programfile and os.isfile(programfile) then
        os.addenv("PATH", path.directory(programfile))
    else
        os.addenv("PATH", os.programdir())
    end
Member

waruqi commented May 24, 2017

@TitanSnow I have removed the $(xmake) variable and and even if sudo cannot inherit the parent environment, the path of xmake is always in the $PATH because I'll add it's directory to $PATH in the main entry function.

function main.init()

    -- add the directory of the program file (xmake) to $PATH environment
    local programfile = os.programfile()
    if programfile and os.isfile(programfile) then
        os.addenv("PATH", path.directory(programfile))
    else
        os.addenv("PATH", os.programdir())
    end
@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 24, 2017

Contributor

So how to deal with build error on travis-ci? The trouble is sudo cannot find xmake not xmake cannot find itself

Contributor

TitanSnow commented May 24, 2017

So how to deal with build error on travis-ci? The trouble is sudo cannot find xmake not xmake cannot find itself

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 24, 2017

Member

@TitanSnow Can you give me your failed travis-ci links?

Member

waruqi commented May 24, 2017

@TitanSnow Can you give me your failed travis-ci links?

@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 24, 2017

Contributor

Below ⬇️ 😃

Contributor

TitanSnow commented May 24, 2017

Below ⬇️ 😃

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 24, 2017

Member

@TitanSnow

So how to deal with build error on travis-ci?

This seems like another problem about luacov.runner. I will look at it.

The trouble is sudo cannot find xmake not xmake cannot find itself

I think xmake can find itself from os.programfile() and I see travis has passed

Member

waruqi commented May 24, 2017

@TitanSnow

So how to deal with build error on travis-ci?

This seems like another problem about luacov.runner. I will look at it.

The trouble is sudo cannot find xmake not xmake cannot find itself

I think xmake can find itself from os.programfile() and I see travis has passed

@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 24, 2017

Contributor

I think xmake can find itself from os.programfile() and I see travis has passed

That is because 962b99c 😓

Contributor

TitanSnow commented May 24, 2017

I think xmake can find itself from os.programfile() and I see travis has passed

That is because 962b99c 😓

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 24, 2017

Member

@TitanSnow Ok, I will look at it.

Member

waruqi commented May 24, 2017

@TitanSnow Ok, I will look at it.

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 24, 2017

Member

@TitanSnow I'm doing some tests on travis-ci

The path of xmake already exists when running sudo sh -c "echo $PATH". => /home/travis/bin

But xmake still not found,I don't know why. 😢

$ which xmake
/home/travis/bin/xmake

$ sudo sh -c "echo $PATH"
/home/travis/bin:/home/travis/.local/bin:/home/travis/.pyenv/shims:/home/travis/.phpenv/shims:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.7.linux.amd64/bin:/home/travis/.local/bin:/opt/pyenv/bin:/opt/python/2.7.12/bin:/opt/python/3.5.2/bin:/opt/python/2.6.9/bin:/opt/python/3.2.6/bin:/opt/python/3.3.6/bin:/opt/python/3.4.4/bin:/opt/python/pypy-5.4.1/bin:/opt/python/pypy3-2.4.0/bin:/usr/local/phantomjs/bin:/usr/local/phantomjs:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v4.1.2/bin:/usr/local/maven-3.1.1/bin:/home/travis/.kiex/elixirs/elixir-1.0.4/bin:/home/travis/.kiex/bin:/usr/local/gradle/bin:/usr/local/clang-3.5.0/bin:/home/travis/.rvm/gems/ruby-2.3.1/bin:/home/travis/.rvm/gems/ruby-2.3.1@global/bin:/home/travis/.rvm/rubies/ruby-2.3.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-9-oracle/bin:/usr/lib/jvm/java-9-oracle/db/bin:/home/travis/.phpenv/bin:/home/travis/.rvm/bin:/home/travis/.lua:/home/travis/.local/bin:/home/travis/build/tboox/xmake/install/luarocks/bin

$ sudo sh -c "xmake --root lua versioninfo"
sh: 1: xmake: not found
Member

waruqi commented May 24, 2017

@TitanSnow I'm doing some tests on travis-ci

The path of xmake already exists when running sudo sh -c "echo $PATH". => /home/travis/bin

But xmake still not found,I don't know why. 😢

$ which xmake
/home/travis/bin/xmake

$ sudo sh -c "echo $PATH"
/home/travis/bin:/home/travis/.local/bin:/home/travis/.pyenv/shims:/home/travis/.phpenv/shims:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.7.linux.amd64/bin:/home/travis/.local/bin:/opt/pyenv/bin:/opt/python/2.7.12/bin:/opt/python/3.5.2/bin:/opt/python/2.6.9/bin:/opt/python/3.2.6/bin:/opt/python/3.3.6/bin:/opt/python/3.4.4/bin:/opt/python/pypy-5.4.1/bin:/opt/python/pypy3-2.4.0/bin:/usr/local/phantomjs/bin:/usr/local/phantomjs:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v4.1.2/bin:/usr/local/maven-3.1.1/bin:/home/travis/.kiex/elixirs/elixir-1.0.4/bin:/home/travis/.kiex/bin:/usr/local/gradle/bin:/usr/local/clang-3.5.0/bin:/home/travis/.rvm/gems/ruby-2.3.1/bin:/home/travis/.rvm/gems/ruby-2.3.1@global/bin:/home/travis/.rvm/rubies/ruby-2.3.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-9-oracle/bin:/usr/lib/jvm/java-9-oracle/db/bin:/home/travis/.phpenv/bin:/home/travis/.rvm/bin:/home/travis/.lua:/home/travis/.local/bin:/home/travis/build/tboox/xmake/install/luarocks/bin

$ sudo sh -c "xmake --root lua versioninfo"
sh: 1: xmake: not found
@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 24, 2017

Contributor

@waruqi The problem is funny: double quote will expand the vars inside 😺

$ sudo sh -c 'echo $PATH'   
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
$ sudo sh -c "echo $PATH"
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ts/.local/bin
Contributor

TitanSnow commented May 24, 2017

@waruqi The problem is funny: double quote will expand the vars inside 😺

$ sudo sh -c 'echo $PATH'   
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
$ sudo sh -c "echo $PATH"
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ts/.local/bin
@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 25, 2017

Contributor

Done

Contributor

TitanSnow commented May 25, 2017

Done

Show outdated Hide outdated makefile

TitanSnow added some commits May 25, 2017

@waruqi waruqi merged commit 0c98817 into tboox:dev May 25, 2017

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 25, 2017

Member

Great! 😄

Member

waruqi commented May 25, 2017

Great! 😄

@TitanSnow TitanSnow deleted the TitanSnow:installtest branch May 25, 2017

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 25, 2017

Member

@TitanSnow Can you help me to improve get.sh to uninstall xmake? Thanks! 😄

for example:

$ ./scripts/get.sh __uninstall__
Member

waruqi commented May 25, 2017

@TitanSnow Can you help me to improve get.sh to uninstall xmake? Thanks! 😄

for example:

$ ./scripts/get.sh __uninstall__

waruqi added a commit that referenced this pull request May 25, 2017

Merge pull request #115 from TitanSnow/installtest
add tests for install & uninstall
(cherry picked from commit 0c98817)
@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 25, 2017

Contributor

ok 👌 I'm also going to add a arg to specify install prefix

Contributor

TitanSnow commented May 25, 2017

ok 👌 I'm also going to add a arg to specify install prefix

@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 26, 2017

Contributor

See 8ffb52a

I have impled __uninstall__ and prefix specification

$ scripts/get.sh __uninstall__
$ env prefix=/usr scripts/get.sh
Contributor

TitanSnow commented May 26, 2017

See 8ffb52a

I have impled __uninstall__ and prefix specification

$ scripts/get.sh __uninstall__
$ env prefix=/usr scripts/get.sh
@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 26, 2017

Member

@TitanSnow 👍

+    # uninstall
+    makefile=$(remote_get_content https://github.com/tboox/xmake/raw/master/makefile)
+    while which xmake >/dev/null 2>&1

I think we can check makefile in the current directory first to faster uninstalling. for example:

$ cd xmake
$ ./scripts/get.sh __uninstall__
Member

waruqi commented May 26, 2017

@TitanSnow 👍

+    # uninstall
+    makefile=$(remote_get_content https://github.com/tboox/xmake/raw/master/makefile)
+    while which xmake >/dev/null 2>&1

I think we can check makefile in the current directory first to faster uninstalling. for example:

$ cd xmake
$ ./scripts/get.sh __uninstall__
@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 26, 2017

Contributor

But how could we know the makefile found in local is xmake's not other's?

And the size of makefile is tiny so I think it doesn't trouble

Contributor

TitanSnow commented May 26, 2017

But how could we know the makefile found in local is xmake's not other's?

And the size of makefile is tiny so I think it doesn't trouble

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 26, 2017

Member

@TitanSnow Ok. 👌 Can you create a new pr for this commit?

Member

waruqi commented May 26, 2017

@TitanSnow Ok. 👌 Can you create a new pr for this commit?

@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 26, 2017

Contributor

Matte, I have a plan of remote rolling pre-build on installation on Windows. That is, the install script get pre-build binary from appveyor rolling build so that no need to build locally to get newest

Contributor

TitanSnow commented May 26, 2017

Matte, I have a plan of remote rolling pre-build on installation on Windows. That is, the install script get pre-build binary from appveyor rolling build so that no need to build locally to get newest

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 26, 2017

Member

Good idea! 👍 But how can you get pre-build binary file from appveyor?

Member

waruqi commented May 26, 2017

Good idea! 👍 But how can you get pre-build binary file from appveyor?

@TitanSnow

This comment has been minimized.

Show comment
Hide comment
@TitanSnow

TitanSnow May 26, 2017

Contributor

You could have a look on that branch

Contributor

TitanSnow commented May 26, 2017

You could have a look on that branch

@waruqi

This comment has been minimized.

Show comment
Hide comment
@waruqi

waruqi May 26, 2017

Member

@TitanSnow Ok. 👍 😄

Member

waruqi commented May 26, 2017

@TitanSnow Ok. 👍 😄

@TitanSnow TitanSnow referenced this pull request May 26, 2017

Merged

getter improve again #119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment