Saturday 6 October 2018

how to install sassc? | Odoo12

Step 1: Clone libsasssasscsass-spec repositories

I'm installing those library for all users. So, I choose, /usr/local/lib directory.
cd /usr/local/lib/
sudo git clone https://github.com/sass/sassc.git --branch 3.4.2 --depth 1
sudo git clone https://github.com/sass/libsass.git --branch 3.4-stable --depth 1
sudo git clone https://github.com/sass/sass-spec.git --depth=1
You need to use sudo because /usr/local/lib directory is root writable only.

Step 2: Set the environment variable

I don't know if this step was necessary, but I did it eventually. The blog post's instruction will give error if you were not using a root shell.
echo 'SASS_LIBSASS_PATH="/usr/local/lib/libsass"' | sudo tee -a /etc/environment
This sets the SASS_LIBSASS_PATH env variable which will be used while compiling sassc to find the required libraries.
source the changed file
source /etc/environment

Step 3: Build libsass

You need to first build the libsass libraries. While you're in the /usr/local/lib directory use this command to build it
sudo make -C libsass

Step 4: Build and install sassc

After step 3 is finished, while still on the /usr/local/lib directory, use this command to build sassc.
sudo make -C sassc
This will generate sassc binary in sassc/bin/ folder. Now use this command to make the binary available globally.
sudo make -C sassc install
That's it. Now from anywhere, try sassc command to see if it's recognized.

No comments:

Post a Comment