txlyre 2 일 전
부모
커밋
8e62eb13c0
2개의 변경된 파일16개의 추가작업 그리고 9개의 파일을 삭제
  1. 5 5
      langs/qi/Dockerfile
  2. 11 4
      langs/qi/run.sh

+ 5 - 5
langs/qi/Dockerfile

@@ -1,5 +1,5 @@
-RUN apt-get install clang -y
-RUN apt-get install wget -y
-
-RUN wget https://files.txlyre.website/d/software/qilang/latest_linux_x86_64/qi -O /usr/bin/qi && chmod +x /usr/bin/qi
-RUN wget https://files.txlyre.website/d/software/qilang/latest_linux_x86_64/libqi.so -O /usr/lib/libqi.so
+RUN apt-get install clang git libgc libgc-dev -y
+RUN wget https://git.txlyre.website/txlyre/qic/raw/master/qic.c
+RUN clang qic.c -o /usr/bin/qic
+RUN rm qic.c
+RUN git clone https://git.txlyre.website/txlyre/libqirt /usr/share/libqirt

+ 11 - 4
langs/qi/run.sh

@@ -1,5 +1,12 @@
-IN="$(mktemp --suffix .qi)"
+TEMPC=$(mktemp --suffix=.c)
+cat | qic > $TEMPC
+if [ $? -ne 0 ]; then
+  exit 1
+fi
+TEMPO=$(mktemp)
+clang -I/usr/share/libqirt -lm "$TEMPC" /usr/share/libqirt/qirt.c -lgc -o "$TEMPO"
+if [ $? -ne 0 ]; then
+  exit 1
+fi
 
-cat > "$IN"
-
-qi -r "$IN"
+"$TEMPO"