GithubHelp home page GithubHelp logo

devexp's Introduction

    $$\                                                   
    $$ |                                                  
$$$$$$$ | $$$$$$\ $$\    $$\  $$$$$$\  $$\   $$\  $$$$$$\  
$$  __$$ |$$  __$$\\$$\  $$  |$$  __$$\ \$$\ $$  |$$  __$$\ 
$$ /  $$ |$$$$$$$$ |\$$\$$  / $$$$$$$$ | \$$$$  / $$ /  $$ |
$$ |  $$ |$$   ____| \$$$  /  $$   ____| $$  $$<  $$ |  $$ |
\$$$$$$$ |\$$$$$$$\   \$  /   \$$$$$$$\ $$  /\$$\ $$$$$$$  |
\_______| \_______|   \_/     \_______|\__/  \__|$$  ____/ 
                                                $$ |      
                                                $$ |      
                                                \__|      

Table of Contents

About

This project creates symbolic links with the same base filename if the file extension is *.s within the directory that is provided as an argument, and skips the rest of the files. Also, one should know that the symbolic link always ends in *.t extension.

These symbolic links can be tested using a separate script included in this repository.

How it works

start.sh

  1. It will check if the directory argument is empty. If yes, it will display the usage and exit (exit 1).
  2. If the argument is not empty, the script will start checking if there are files that end in *.s extension inside the provided path, and it will exit if such files do not exist (exit 2).
  3. If the files are present, the script will start creating symbolic links and it will write the paths to results.txt.

test.sh

  1. It will check if the results.txt exists. If not, it will return Nothing to test here. and exit (exit 1).
  2. If the results.txt does exist, the script will parse path by getting the first field using awk and by removing the single quotes globally (') using sed. After parsing, the values will be assigned to FILES variable.
  3. Using the FILES variable, the script will check if each file exists and if it is a symbolic link.
  4. If it is not a symbolic link, it will display an error that it does not exist.
  5. Successful test results will display something like this: /path/to/file is a symlink.

Prerequisites

  • Docker Desktop
    • Tested using Docker Desktop for macOS v3.3.3 (64133)
    • Engine version 20.10.6, build 370c289
  • Ubuntu Official Docker Image
    • Tested using ubuntu:latest
    • Image Digest: sha256:adf73ca014822ad8237623d388cedf4d5346aa72c270c5acc01431cc93e18e2d

Usage

Download this repository to your local

git clone https://github.com/jpdoria/devexp.git

Download the Ubuntu Official Docker Image

docker pull ubuntu:latest

Start the container

docker run --name devexp --rm -it -v $PWD/devexp:/root/devexp -w /root/devexp ubuntu:latest bash

Create symlinks

./start.sh <path/to/directory>

Test symlinks

./test.sh

Demo

Demo

devexp's People

Contributors

jpdoria avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.