Skip to content

Instantly share code, notes, and snippets.

@hasssan
Last active November 8, 2016 06:12
Show Gist options
  • Save hasssan/1db3f1d6703a4bdb3cb3758063c9f71f to your computer and use it in GitHub Desktop.
Save hasssan/1db3f1d6703a4bdb3cb3758063c9f71f to your computer and use it in GitHub Desktop.
convert .ls to .js
#!/bin/bash
# compile to js
#find $1 -type f -name '*.ls' -exec lsc -b -c {} \;
# fix some extension from lsc compiler
#for loca in `git ls-files --others --exclude-standard`; do
# if [[ $loca != *.js ]] && [[ $loca != *.sh ]]; then
# mv "$loca" "$loca.js"
# fi
#done
# delete .ls file in provided path
#if ! [[ -z '$1' ]]; then
# find $1 -type f -name '*.ls' -exec rm -f {} \;
#else
# echo "Empty argument"
#fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment